How to Install WordPress® With cPanel

Valid for versions 104 through the latest version

Version:

102

104


Last modified: January 30, 2023

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.

Note:

The Onboarding Assistant automatically creates a WordPress® website for the new cPanel account if the user selects the WordPress option.

Install WordPress

Install WordPress from WP Toolkit

In cPanel & WHM version 92 and newer, users can install WordPress through the WP Toolkit interface (cPanel » Tools » Domains » WP Toolkit).

For information about how to install, configure, and manage WordPress sites with WP Toolkit, read Plesk’s WP Toolkit documentation.

Install WordPress as Site Software

Note:

We deprecated Site Software in cPanel & WHM version 104. For more information, read our cPanel Deprecation Plan documentation.

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.

Install WordPress Manually

If your hosting provider does not offer WordPress, 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:

Note:

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.

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

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

mysql -u db_user -p

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

Additional Documentation