Cpanel Wordpress



Table of Contents

  1. In this video, I am going to show you How to Install WordPress in cPanel Manually Step by Step in 2021. Hope this will be very helpful to you all.
  2. CPanel can be classified as a tool in the 'Server Configuration and Automation' category, while WordPress is grouped under 'Self-Hosted Blogging / CMS'. WordPress is an open source tool with 12.7K GitHub stars and 7.78K GitHub forks. Here's a link to WordPress's open source repository on GitHub.
  • Overview
  • Create a WordPress site backup
  • Clear a WordPress installation cache
  • Clear the WordPress Toolkit cache
  • Display the WordPress Toolkit help documentation
  • Clone a WordPress site to a domain and/or subdirectory
  • Manage WordPress Toolkit configuration settings
  • Copy file and database table data from one WordPress site to another
  • Detach a WordPress site from WordPress Toolkit
  • Display information about a WordPress installation
  • Install a new WordPress site on a domain
  • Display the available locales for a version of WordPress
  • Display information for all WordPress installations
  • Manage your available WordPress plugins
  • Add a WordPress installation to the WordPress Toolkit
  • Manage WordPress plugin and theme sets
  • Manage WordPress Toolkit Smart Updates for a WordPress site
  • Manage your available WordPress themes
  • Update a WordPress site URL
  • List all available WordPress versions for WordPress Toolkit
  • Execute a wp-cli command to the given WordPress installation
  • Update the wp-config.php file settings
  • Install a WordPress Toolkit license
  • Update the operation system type and version

CPanel & WHM® has introduced a revolutionary new way to manage WordPress sites. The WordPress Toolkit (WPTK) empowers web hosting providers and site owners to install, secure, and configure multiple websites in a single easy-to-use interface.

Table of Contents

  • Overview
  • Create a WordPress site backup
  • Clear a WordPress installation cache
  • Clear the WordPress Toolkit cache
  • Display the WordPress Toolkit help documentation
  • Clone a WordPress site to a domain and/or subdirectory
  • Manage WordPress Toolkit configuration settings
  • Copy file and database table data from one WordPress site to another
  • Detach a WordPress site from WordPress Toolkit
  • Display information about a WordPress installation
  • Install a new WordPress site on a domain
  • Display the available locales for a version of WordPress
  • Display information for all WordPress installations
  • Manage your available WordPress plugins
  • Add a WordPress installation to the WordPress Toolkit
  • Manage WordPress plugin and theme sets
  • Manage WordPress Toolkit Smart Updates for a WordPress site
  • Manage your available WordPress themes
  • Update a WordPress site URL
  • List all available WordPress versions for WordPress Toolkit
  • Execute a wp-cli command to the given WordPress installation
  • Update the wp-config.php file settings
  • Install a WordPress Toolkit license
  • Update the operation system type and version

WordPress® Toolkit Command Line Interface

Valid for versions 92 through the latest version

Last modified: April 21, 2021

Overview

This document lists all of the commands available via the WordPress® Toolkit command line interface.

Create a WordPress site backup

Options

This command accepts the following options:

Description
-instance-idThe WordPress installation’s ID.
-domain-nameThe domain name.
-pathThe relative filepath from the domain’s document root directory. For example: /subdirectory
-operationThe action to perform:
  • backup — Perform a WordPress site backup.
  • restore — Restore a WordPress site backup.
  • list — List available backup files.
-filenameThe backup file’s name.
-formatOutput the data in a specific format:
  • json — JSON format.
  • raw — Raw output format.
This option defaults to raw data output.

Example

Clear a WordPress installation cache

Options

This command accepts the following options:

Option
Description
-instance-idRequired
The WordPress installation’s ID.
-domain-nameRequired
The domain name.
-pathRequired
The relative filepath from the domain’s document root directory. For example: /subdirectory
-formatOutput the data in a specific format:
  • json — JSON format.
  • raw — Raw output format.
This option defaults to raw data output.

Example

Clear the WordPress Toolkit cache

Display the WordPress Toolkit help documentation

Options

This command accepts the following options:

OptionDescription
-commandDisplay a WordPress Toolkit command’s help documentation.

Example

Clone a WordPress site to a domain and/or subdirectory

Options

This command accepts the following options:

Option
Description
-source-instance-idRequired
The source WordPress site ID to clone.
-target-domain-nameThe target domain name to clone the WordPress site ID to.
-target-pathThe path inside the target domain’s document root for cloning the WordPress site. This option defaults to the domain root.
-target-db-nameThe target database name. If you do not use this option, the command automatically creates the database’s name.
-target-db-user-loginThe username of the target database user. To specify a password for the database user, use the TARGET_DB_USER_PASSWORD environment variable. If you do not use this option, the command automatically creates the username.
-force-overwriteWhether WordPress Toolkit will overwrite data on the target domain and path, ignoring any existing WordPress installations and other site data.
  • yes — Overwrite data.
  • no — Do not overwrite data.
This option defaults to no.
-formatOutput the data in a specific format:
  • json — JSON format.
  • raw — Raw output format.
This option defaults to raw data output.
-show-progressWhether to display the operation’s progress:
  • yes — Display the operation’s progress.
  • no — Perform the operation silently.
By default, the command displays the operation progress unless you’ve specified the json output format.

Example

Manage WordPress Toolkit configuration settings

Options

This command accepts the following options:

Cpanel Wordpress
Description
-operationRequired
The action to perform:
  • list — Display all available configuration settings and their current values.
  • get — Display a configuration setting’s information. This option requires the -option-name option.
  • set — Set a new configuration setting value. This option requires the -option-name and -option-value options.
  • rollback — Restore a configuration setting to its default value. This option requires the -option-name option.
-option-nameThe configuration setting’s name. The setting’s name is case-sensitive and cannot be a read-only configuration setting.
-option-valueThe new configuration setting value.
-formatOutput the data in a specific format:
  • json — JSON format.
  • raw — Raw output format.
This option defaults to raw data output.

Example

Copy file and database table data from one WordPress site to another

Options

This command accepts the following options:

Option
Description
-source-instance-idRequired
The source WordPress site’s installation ID.
-target-instance-idRequired
The target WordPress site’s installation ID.
-data-to-copyThe data to copy:
  • all — Copy all files and database.
  • files — Copy files only.
  • db — Copy the database only.
-files-replace-modifiedWhether to replace the target WordPress site’s files with the source WordPress site’s files, even if the source site’s files are older:
  • yes — Replace the target site’s files.
  • no — Do not replace the target site’s files.
This option defaults to yes.
-files-remove-missingWhether to remove any files that exist on the target WordPress site but do not exist on the source site:
  • yes — Remove files.
  • no — Do not remove files.
-db-tables-copy-modeThe database tables to copy:
  • default — Copy all tables except the postmeta, posts, usermeta, users data tables.
  • all — Copy all tables of the source WordPress site. You can exclude specific tables with the -exclude-db-tables option.
  • new — Copy tables that exist on the source WordPress site but do not exist on the target WordPress site.
  • selected — Select the exact tables to copy. This option requires the -db-tables option.
-db-tablesA comma-separated list of database tables to copy.
-exclude-db-tablesA comma-separated list of database tables to exclude from copying.
-create-restore-pointCreate a restore point you can use to revert any changes:
  • yes — Create a restore point.
  • no — Do not create a restore point.
This option defaults to yes.
-show-progressWhether to display the operation’s progress:
  • yes — Display the operation’s progress.
  • no — Perform the operation silently.
By default, the function displays the operation progress unless you’ve specified the json output format.

Example

Detach a WordPress site from WordPress Toolkit

This command does not uninstall the cPanel account’s WordPress site.

Options

This command accepts the following options:

Description
-instance-idRequired
The WordPress installation’s ID.
-domain-nameRequired
The domain name.
-pathRequired
The relative filepath from the domain’s document root directory. For example: /subdirectory

Example

Display information about a WordPress installation

Options

This command accepts the following options:

Option
Description
-instance-idRequired
The WordPress installation’s ID.
-domain-nameRequired
The domain name.
-pathRequired
The relative filepath from the domain’s document root directory. For example: /subdirectory
-formatOutput the data in a specific format:
  • json — JSON format.
  • raw — Raw output format.
This option defaults to raw data output.

Example

Install a new WordPress site on a domain

Options

This command accepts the following options:

Cpanel wordpress install
Description
-domain-nameRequired
The domain name.
-usernameThe WordPress site administrator’s username. To set its password, use the ADMIN_PASSWORD environment variable.
If you do not specify this value, the system generates an admin_ account with a randomized suffix value. For example: admin_jzsfbt4l
-admin-emailThe WordPress site administrator’s email address.
If you do not specify this value, the system creates the admin email account. For example: admin@example.com
-protocolThe WordPress site’s protocol:
  • http — The HTTP protocol.
  • https — The HTTPS protocol.
This option defaults to https.
-pathA relative filepath from the domain’s document root directory. For example: /subdirectory
This option defaults to the cPanel account’s home directory.
-versionThe WordPress version number. For a list of available versions, use the --versions command.
This option defaults to the most recent version of WordPress.
-languageThe WordPress site’s locale. For a list of available locales, use the --languages command.
This option defaults to en_US.
-db-nameThe database’s name.
If you do not specify this value, the system generates a database name using the cPanel account’s username. For example: username_wp_f0ehk
-db-userThe database user’s username. To specify a password for the database user, use the DB_PASSWORD environment variable.
If you do not specify this value, the system generates a username using the cPanel account’s username. For example: username_wp_vfcf4
-table-prefixThe database table’s prefix.
If you do not specify this value, the system generates a prefix.
-site-titleThe WordPress site’s title, surrounded by quotes.
If you do not specify this value, the system generates a random site title.
-auto-updatesWhether to enable automatic security updates for the new Wordpress site:
  • true — Enable all (major and minor) automatic security updates.
  • false — Do not enable automatic security updates.
  • minor — Only enable minor security updates.
This option defaults to true.
-plugins-auto-updatesWhether to enable automatic updates for Wordpress plugins:
  • true — Enable automatic updates.
  • false — Do not enable automatic updates.
This option defaults to false.
-themes-auto-updatesWhether to enable automatic updates for Wordpress themes:
  • true — Enable automatic updates.
  • false — Do not enable automatic updates.
This option defaults to false.
-show-progressWhether to display the operation’s progress:
  • yes — Display the operation progress.
  • no — Perform the operation silently.
By default, the function displays the operation progress unless you’ve specified the json output format.
-formatOutput the data in a specific format:
  • json — JSON format.
  • raw — Raw output format.
This option defaults to raw data output.

Example

Display the available locales for a version of WordPress

Options

This command accepts the following options:

OptionDescription
-versionRequired
The WordPress version number.
-formatOutput the data in a specific format:
  • json — JSON format.
  • raw — Raw output format.
This option defaults to raw data output.

Example

Display information for all WordPress installations

Options

This command accepts the following options:

OptionDescription
-domain-nameThe domain name.
-pluginsAlso display each WordPress installation’s number of installed plugins.
-themesAlso display each WordPress installation’s number of installed themes.
-formatOutput the data in a specific format:
  • json — JSON format.
  • raw — Raw output format.
This option defaults to raw data output.

Example

Manage your available WordPress plugins

Options

This command accepts the following options:

Option
Description
-operationRequired
The action to perform:
  • add — Add a new WordPress plugin. This option requires the -source-url and -path options.
  • remove — Remove an installed WordPress plugin. This option requires the -id and -version options.
  • list-custom — List all custom WordPress plugins.
-idThe WordPress plugin’s ID.
-versionThe WordPress version number.
-source-urlThe plugin’s URL.
-pathThe relative filepath from the domain’s document root directory. For example: /subdirectory
-formatOutput the data in a specific format:
  • json — JSON format.
  • raw — Raw output format.
This option defaults to raw data output.

Example

Add a WordPress installation to the WordPress Toolkit

Options

This command accepts the following options:

Description
-domain-nameRequired
The domain name.
-pathRequired
The relative filepath from the domain’s document root directory. For example: /subdirectory
-formatOutput the data in a specific format:
  • json — JSON format.
  • raw — Raw output format.
This option defaults to raw data output.

Example

Manage WordPress plugin and theme sets

Options

This command accepts the following options:

Option
Description
-operationRequired
The action to perform:
  • list — List all available WordPress sets.
  • info — Display a WordPress set’s information. This option requires the set-id option.
  • add — Add a WordPress set. This option requires the -name option.
  • remove — Remove a WordPress set. This option requires the -set-id option.
  • rename — Rename a WordPress set. This option requires the -name option.
  • add-plugin — Add a WordPress plugin to a set. This option requires the -add-plugin and -remove-plugin options.
  • add-theme — Add a WordPress theme to a set. This option requires the -set-id option.
  • remove-plugin — Remove a WordPress plugin from a set. This option requires the -set-id option.
  • remove-theme — Remove a WordPress theme from a WordPress installation. This option requires the set-id and instance-id options.
  • install — Install a set on a WordPress installation. This option requires the set-id and instance-id options.
  • activate-plugin — Activate a WordPress set plugin. This option requires the set-id option and the plugin-id or plugin-slug options.
  • deactivate-plugin — Deactivate a WordPress set plugin. This option requires the set-id option and the plugin-id or plugin-slug options.
  • activate-theme — Activate a WordPress set theme. This option requires the set-id option and theme-id or theme-slug options.
  • deactivate-theme — Deactivate a WordPress set theme. This option requires the set-id option and the theme-id or theme-slug options.
-instance-idThe WordPress installation’s ID.
-plugin-idThe WordPress plugin’s ID.
-plugin-slugThe WordPress plugin’s slug name.
-set-idThe WordPress set’s ID.
-nameThe WordPress set’s name.
-theme-idThe WordPress theme’s ID.
-theme-slugThe WordPress theme’s slug name.
-formatOutput the data in a specific format:
  • json — JSON format.
  • raw — Raw output format.
This option defaults to raw data output.

Example

Manage WordPress Toolkit Smart Updates for a WordPress site

Options

This command accepts the following options:

Description
-instance-idThe WordPress installation’s ID.
-domain-nameThe domain name.
-pathThe relative filepath from the domain’s document root directory. For example: /subdirectory
-operationRequired
The action to perform:
  • enable — Enable Smart Updates.
  • disable — Disable Smart Updates.
  • status — Display a WordPress installation’s Smart Update status. This option requires the -instance-id option.
-formatOutput the data in a specific format:
  • json — JSON format.
  • raw — Raw output format.
This option defaults to raw data output.

Example

Manage your available WordPress themes

Options

This command accepts the following options:

Option
Description
-operationRequired
The action to perform:
  • add — Add a WordPress theme. This option requires the -source-url and -path options.
  • remove — Remove a WordPress theme. This option requires the -id and -version options.
  • list-custom — List all installed WordPress themes.
-idThe theme’s ID.
-versionThe WordPress version number.
-source-urlThe theme’s source URL.
-pathThe relative filepath from the domain’s document root directory. For example: /subdirectory
-formatOutput the data in a specific format:
  • json — JSON format.
  • raw — Raw output format.
This option defaults to raw data output.

Example

Update a WordPress site URL

Options

This command accepts the following options:

Description
-instance-idRequired
The WordPress installation’s ID.
-domain-nameRequired
The domain name.
-pathRequired
The relative filepath from the domain’s document root directory. For example: /subdirectory
-formatOutput the data in a specific format:
  • json — JSON format.
  • raw — Raw output format.
This option defaults to raw data output.

Example

List all available WordPress versions for WordPress Toolkit

Options

This command accepts the following options:

OptionDescription
-formatOutput the data in a specific format:
  • json — JSON format.
  • raw — Raw output format.
This option defaults to raw data output.

Example

Execute a wp-cli command to the given WordPress installation

For a list of available commands and their subcommands, read WordPress’ wp-cli documentation.

Options

This command accepts the following options:

Description
-instance-idRequired
The WordPress installation’s ID.
-domain-nameRequired
The domain name.
-pathRequired
The relative filepath from the domain’s document root directory. For example: /subdirectory

Example

Update the wp-config.php file settings

  • You can pass all wp-config.php file settings through environment variables. To do this, you must specify an empty parameter value.
  • For information about the wp-config.php file and its settings, read WordPress’ Editing wp-config.php documentation.

Options

This command accepts the following options:

Description
-instance-idRequired
The WordPress installation’s ID.
-domain-nameRequired
The domain name.
-pathRequired
The relative filepath from the domain’s document root directory. For example: /subdirectory

Example

Install a WordPress Toolkit license

Update the operation system type and version

This command may be required after converting your system from CentOS to CloudLinux™.

Additional Documentation

Table of Contents

  • Overview
  • Install WordPress
  • Install WordPress from WordPress Toolkit
  • Install WordPress from WordPress Manager
  • Install WordPress as Site Software
  • Install WordPress Manually

Table of Contents

  • Overview
  • Install WordPress
  • Install WordPress from WordPress Toolkit
  • Install WordPress from WordPress Manager
  • Install WordPress as Site Software
  • Install WordPress Manually

Last modified: October 28, 2020

Overview

WordPress®, a web-based content management system, allows users to easily create a website or blog. This document describes how to install WordPress on your cPanel account.

Install WordPress

Install WordPress from WordPress Toolkit

In cPanel & WHM version 92 and newer, users can install WordPress through the WordPress Toolkit interface.

For instructions on how to install WordPress through WordPress Toolkit, read Plesk’s WordPress Toolkit documentation.

Install WordPress from WordPress Manager

In cPanel & WHM version 70 through 90, users can install WordPress through the WordPress Manager interface.

For instructions on how to install WordPress through WordPress Manager interface, read our WordPress Manager documentation.

Install WordPress as Site Software

In cPanel & WHM version 90 and earlier, users can install WordPress as a cPAddon with cPanel’s Site Software interface (cPanel >> Home >> Software >> Site Software).

To install WordPress as a cPAddon, perform the following steps:

  1. Navigate to cPanel’s Site Software interface (cPanel >> Home >> Software >> Site Software).

  2. To receive a notice via email when the hosting provider installs WordPress, click here after the You currently are set to receive a notice when updates for your installs are available text.

  3. Click WordPress.

  4. Enter the requested information.

    • To install WordPress directly into a domain’s document root, leave the installation URL’s path blank. This may overwrite any files already in the document root.
  5. Click Install.

    • If your hosting provider moderates requests for WordPress installation, click Submit Moderation Request.
    • Enter a note for your hosting provider, and click Submit Request.
  6. When the WordPress installation finishes, use your web browser to view the location that you entered in Step 4.

    • For example, if you installed WordPress in the http://example.com/wordpress/ directory, browse to the http://example.com/wordpress/ URL.

If WordPress is not available as a cPAddon, users can ask their hosting provider to add it, or they install WordPress directly themselves. For more information, read the User installs WordPress Manually section below.

The WordPress Manager interface (cPanel >> Home >> Applications >> WordPress Manager) allows you to manage the WordPress installations on your cPanel account. The WordPress Manager interface only manages WordPress installations that you create with the RPM-based WordPress cPAddon.

Install WordPress Manually

If your hosting provider does not offer WordPress as a cPAddon, you can manually download WordPress from the WordPress website and install it on your site.

For more information, read installation instructions from WordPress and their cPanel-specific instructions on how to create a database for WordPress.

Manual installations may encounter issues due to conflicting .htaccess files or database connection errors:

In the following examples, the following statements are true:

  • example.com represents the domain name.

  • example represents the account name.

  • subdomain represents a subdomain’s directory.

  • addon.com represents an addon domain name.

Document root issues

Due to potential conflicts in the .htaccess file, do not configure multiple WordPress installations to share a single document root. If you experience difficulties with WordPress, check the following requirements:

  • Each cPanel account user can host only one installation of WordPress in the document root directory.

    • The following are examples of document root directories:

    • /home/example/public_html/

    • /home/example/public_html/addon.com

    • /home/example/public_html/subdomain

    • Each directory may only contain one WordPress installation.

    • If the subdirectories are not a document root, cPanel account users can install additional WordPress installations in subdirectories under the domain’s home/example/public_html directory.

    • The following examples demonstrate installations that use the wordpress subdirectory:

      • Under the document root for the main domain: /home/example/public_html/wordpress

      • Under a subdomain: /home/example/public_html/subdomain/wordpress

      • Under an addon domain: /home/example/public_html/addon.com/wordpress

For more information, visit the WordPress website.

Database connection errors

If WordPress returns a database connection error, ensure that the database’s name and password in the wp-config.php file are identical to the database credentials in your account.

For a document root installation, the wp-config file exists in the /home/username/public_html directory, where username represents the cPanel account name.

Cpanel Wordpress Dns

To change the database’s username or password, use cPanel’s MySQL Databases interface (cPanel >> Home >> Databases >> MySQL Databases).

If your hosting provider installed the new RPM-based WordPress cPAddon, you can use cPanel’s WordPress Manager interface (cPanel >> Home >> Applications >> WordPress Manager) to update your WordPress database user’s password.

To test a username and password combination, run the following command (where db_user represents the database’s authorized username):

Cpanel Wordpress Toolkit Install

After you enter the command, enter the user’s password. The system will respond with a success or failure message.

Cpanel Wordpress Godaddy

Additional Documentation