How to Install WordPress® With cPanel

Valid for versions 104 through 102

Valid for versions 104 through the latest version




Last modified: February 8, 2024


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.


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 later, 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 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:


In the following examples, the following statements are true:

  • represents the domain name.

  • example represents the account name.

  • subdomain represents a subdomain’s directory.

  • 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/
      • /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/

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 Manage My Databases interface (cPanel » Home » Databases » Manage My 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