4 Great Methods For Installing WordPress On cPanel

Installing WordPress in cPanel? Learn how to install WordPress 5.0+ versions step-by-step on your cPanel hosting account with the best WordPress hosting.

What is WordPress?

WordPress (built on PHP and MySQL) is the easiest and most powerful website content management system (or CMS) that you can use to build any kind of website to share your story, product, or services

As a CMS, it was designed in such a way that people with a limited tech experience can use it “out of the box”, and more tech-savvy folks can customize it in remarkable ways.

But more, WordPress is open source software that is 100% free under the GPLv2 license.

See Wikipedia and Free Software Foundation for a better understanding of what this mean.) and that in itself, is priceless.

Whatever it is that you want to do online, WordPress is a vehicle you can use to drive such passion which, in turn, helps you reach your goals.

And with over 507 WordCamps ( locally organized conferences covering everything related to WordPress.) in over 207 cities in 48 different countries around the world, you will always find a welcoming and inclusive WordPress community that you can join for even better experience.

The web hosting guide below shows you in simple terms, 4 ways you can use to install WordPress to your cPanel hosting account.

What is cPanel?

cPanel is a time-tested, browser-based Linux web hosting control panel that was designed to make administration of websites easy and for over 20 years, has remained the leading hosting automation platform.

You might describe cPanel as a well-thought out suite of applications designed that provide you with the tools needed to create and automate all server management tasks, allowing you to focus on building every facet of your WordPress website experience.

Why should you use WordPress?

There is sometimes this mistaken notion that WordPress is just a blogging platform.

Yes, it started as a blogging tool but over the years has evolved into a very robust content management system (CMS) that is used by 59.9% of all the websites online.

This is 27.5% of the top 10 million websites.

The latest WordPress version WordPress 5.0 comes with complete with a fresh new block editor that offers incredible flexibility with how content is displayed, whether you are building your first site, redesigning your blog, or write code for a living.

WordPress 5.0

WordPress 5.0

  • WordPress is written in standard, W3-compliant, high-quality code with great semantic markup that improves the accessibility of its content, something that Google and other search engines loves.
  • WordPress is built with strong emphasize on accessibility, performance, security, and ease of use.
  • WordPress has an in-built updates management system that allows you to update your plugins and themes from within your WordPress admin dashboard.
  • As a blogging tool, WordPress has an in-built media uploader to handle of files including images, audio, video files. It is oEmbed capable that you can embed YouTube videos, Instagram photos, Tweets, and Soundcloud audio by just pasting the URL in the WordPress post editor.
  • WordPress has both ‎iOS and Android apps so you can create and edit posts and pages, upload your favorite photos and videos, view stats and reply to comments, even on the go.
  • finding a WordPress developer is the most easiest thing you could do and their pricing, is simply affordable.
  • and lastly, WordPress is supported by skilled, enthusiastic developers, designers, scientists, bloggers, and more.

WordPress.com vs Self-Hosted WordPress (WordPress.org)

Sometimes, new WordPress users opt for WordPress.com to publish their first blog.

Yes, the site do offer you opportunities to build and maintain a free WordPress blog.

But there are serious downsides to a free WordPress blog account because to use custom themes, some plugins, or to use your own domain name requires a paid upgrade.

You will also be unable to manage your email or any other facet of your domain with WordPress.com.

As a forward-forward looking entrepreneur, the best way to use WordPress is to install a standalone instance of WordPress on your cPanel-hosted server.

The reason is that a free-standing WordPress install would give you more flexibility on managing your blog and WordPress website, including installing plugins or themes, customizing the CSS beyond a theme, configuring advanced PHP settings, etc.

WordPress Installation Issues

Document root issues


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 add-on domain name.

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/domain_name/public_html/
      • /home/domain_name/public_html/addon.com
      • /home/domain_name/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/domain_name/public_html/wordpress
      • Under a subdomain: /home/domain_name/public_html/subdomain/wordpress
      • Under an addon domain: /home/domain_name/public_html/addon.com/wordpress

WordPress Manager

Using cPanel WordPress Manager

The cPanel WordPress Manager interface allows you to manage new or existing WordPress® installations on your cPanel account.

You can use this to view your WordPress database name and user, and view and change each installation's automatic updates configuration.

You can also view each installation's basic WordPress configuration and change the WordPress administrator users' passwords.

To create new WordPress installations,

  • Login to cPanel.
  • Backup your existing websites using the cPanel Backup Wizard before you do anything else.
  • Scroll down to the Applications section.
  • Click on the WordPress Manager icon.
  • Click New Site at the top of the interface.

cPanel's Site Software interface (cPanel >> Home >> Software >> Site Software) will appear and allow you to complete the installation.

Again, double-check to ensure that you are installing WordPress on the correct domain so that you don't end up over-writing your existing website.

Warning: You must not modify or delete the default WordPress plugins and themes that the cPanel installation provides.

WordPress will not update properly if you modify any of these files.

Use Softaculous To Install WordPress

Softaculous is a script library that you can use to install PHP, PERL, JAVA, JavaScript applications to your domain on a click of a button.

It takes away all the manual labor and typically create tables in a database for you, install the software, adjust permissions, and modify web server configuration files all in minutes and even takes care of the complete lifecycle of the application from install to backup to update.

On Web Hosting Magic, Softaculous is tightly integrated with our cPanel and our users can access over 449 applications.

Installing WordPress using Softaculous takes a couple of minutes and frankly, no advanced skills is needed.

Once your hosting account is ready, you can find Softaculous by scrolling down to the "Software" section of your cPanel.


The following assumes that you have logged in to cPanel and have created the admin email address you want to use as a WordPress administrator.

If you are not sure how to create an email address, please do contact our technical support team to do this for you and send it to the email you have on file or visit our knowledgebase to learn how to create an email account in cPanel.

  • CLick on the Softaculous icon. The page will load and you will see the administration area of Softaculous.
  • In the Search text box, type "wordpress" and then press ENTER.
  • Click Install. The installation page appears.
  • In the Choose Protocol list box, select select https:// or https://www since every website we host is covered by a Universal SSL.

    Now comes the most crucial part for you see, if you make a mistake in the next two step, you will either ovwer-write an existing website or install WordPress on the wrong folder or directory. Please be mindful of this.

  • In the Choose Domain list box, select the domain for installation, or accept the default value.
  • In the In Directory text box, type the directory where you want to install the application, or accept the default value.
  • In the Database Name text box, type the name of the database to create for the application, or accept the default value.

    We highly recommend that you give each database name a unique name that you can use later to differentiate each WordPress install. This reduces administrative mistakes and help you know on which database, you are working on.

  • In the Table Prefix text box, type the database table prefix, or accept the default value.
  • In the Site Name text box, type the site name. By default, the site name appears in the title bar of users' web browsers when they visit your site. You can always change this later.
  • In the Site Description text box, type the site description. By default, the site description also appears in the title bar of users' web browsers when they visit your site. You can always change this later.
  • WordPress includes the ability to create a network of sites by using the multi-site feature. End users of your network can create their own sites or blogs on demand.

    If you do not have any need to allow end users to create their own sites on demand, you can create a multisite network in which only you, the administrator, can add new sites

    To enable the WordPress Multisite feature (also known as WordPress Multiuser or WPMU), select the check box.

  • In the Admin Username text box, type the administrator username.
  • In the Admin Password text box, type the administrator password. Our system enforces strong password requirement. Use the password generator to create a strong password.
  • In the Admin Email text box, type the site administrator e-mail address you created earlier.
  • In the Select Language list box, select the default language for the application.
  • To limit the number of login attempts, select the Limit Login Attempts check box. There are alos other plugins that you can install during this process
  • Click the Advanced Options icon icon to expand Advanced Options.
  • Though not recommended, if you do not want to receive e-mail notifications when application updates are available, select the Disable Update Notifications check box.
  • To automatically update the application when updates are available, select the Auto Upgrade check box.
  • To automatically update plugins when updates are available, select the Auto Upgrade WordPress Plugins check box.
  • To automatically update themes when updates are available, select the Auto Upgrade WordPress Themes check box.
  • To receive site configuration information after the installation is complete, type an e-mail address in the Email installation details to text box.
  • Review the installation options and settings, and then click Install.

When installation is complete, Softaculous provides information about the application's configuration.

WordPress Installation With WP-CLI

This is a bit advanced, but doable.

You need to have a good grasp of the command line to be able to use WP-CLI.

Please use caution when performing commands on the database and always make sure to take a backup first.

So what is WP-CLI?

WP-CLI is the command-line interface for WordPress. You can use it to update plugins, configure multisite installs and much more, without using a web browser.

WP-CLI provides a command-line interface for many actions you might perform in the WordPress admin.

For instance, you can install and activate a WordPress plugin using a simple command such:

wp plugin install --activate

see (doc)

$ wp plugin install user-switching --activateInstalling User Switching (1.0.9)Downloading install package from https://downloads.wordpress.org/plugin/user-switching.1.0.9.zip...Unpacking the package...Installing the plugin...Plugin installed successfully.Activating 'user-switching'...Plugin 'user-switching' activated.Success: Installed 1 of 1 plugins.

WP-CLI also includes commands for many things you can’t do in the WordPress admin.

For example, wp transient delete --all (doc) lets you delete one or all transients:

$ wp transient delete --allSuccess: 34 transients deleted from the database.
  • wp core for managing WordPress core files
  • wp comment for regulating comments
  • wp db for interacting with the database
  • wp export for exporting your content
  • wp media for importing or regenerating media
  • wp option for updating options
  • wp post for managing your posts
  • wp scaffold for generating standard code registering post types, taxonomies, plugins, and more
  • wp theme for managing your themes
  • wp user to control your user list
  • wp doctor for diagnosing problems
  • wp profile for identifying performance issues

For a more complete introduction to using WP-CLI, read the Quick Start guide.

Or, catch up with shell friends to learn about helpful command line utilities.

You can also jump into the complete list of commands for detailed information on managing themes and plugins, importing and exporting data, performing database search-replace operations and more.

 $ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
 $ chmod +x wp-cli.phar
 $ php wp-cli.phar --info

add the following to your .bash_profile:

 $ alias wp='~/wp-cli.phar'


 $ echo "alias wp='~/wp-cli.phar'" >> .bashrc


 $ source .bash_profile


 $ source .bashrc

If you are Web Hosting Magic VPS or dedicated server customer, just these commands below:

 sudo mv wp-cli.phar /usr/local/bin/wp

If you are unable to this on your own, please contact our technical suport team so we can install WP-CLI for you, on your server.

These steps assumes that you have successfully created a database in cPanel.

Access the cPanel Terminal interface located at cPanel >> Home >> Advanced >> Terminal or login from you local machine Terminal by using:

$ cpanel_username@123.456.789.01 (server IP address)


$ cpanel_username@domain_name.com (if you have setup your DNS correctly)


$ cpanel_username@server_hostname.com

Watch it; it decision time!

If you want to install WordPress under a section of your website (domain_name.com/blog or blog.domain_name.com instead of all domain_name.com), then you need to:

  • ensure that you are in the correct directory in the case of a sub-domain
  • create the directory and change your directory so you are in the new directory before running the next two lines

To create a new directory for our sub-folder WordPress installation, type in:

$ mkdir -p $name && cd $name

Now, let's download the most recent WordPress core files:

$ cd public_html && wp core download

You should see something like this:

Downloading WordPress 5.0.3 (en_US)...Using cached file '/home/adaptive/.wp-cli/cache/core/wordpress-5.0.3-en_US.tar.gz'...Success: WordPress downloaded.

Check the result of the last command:

$ ls -al

Run a checksum by downloading md5 checksums for the current version from WordPress.org, and comparing those checksums against the currently installed files.

Please note that WordPress caution again loading WordPress when verifying checksums.

# Verify checksums$ wp core verify-checksumsSuccess: WordPress installation verifies against checksums.# Verify checksums for given WordPress version$ wp core verify-checksums --version=4.0Success: WordPress installation verifies against checksums.# Verify checksums for given locale$ wp core verify-checksums --locale=en_USSuccess: WordPress installation verifies against checksums.# Verify checksums for given locale$ wp core verify-checksums --locale=jaWarning: File doesn't verify against checksum: wp-includes/version.phpWarning: File doesn't verify against checksum: readmeWarning: File doesn't verify against checksum: wp-config-sample.phpError: WordPress installation doesn't verify against checksums.

At this point, frankly we suggest visiting WordPress install.php to complete the configuration as this would make the process more easier and clearer to you.


So if you have placed the WordPress files in your root directory, you should visit: https://domain_name.com/wp-admin/setup-config.php.

If you have placed the WordPress files in a subdomain, you should visit: https://subdomain.com/wp-admin/wp-admin/setup-config.php

If you placed the WordPress files in a subdirectory called blog, for example, you should visit: http://domain_name.com/blog/wp-admin/setup-config.php

WordPress will ask you the database details and write them to a new wp-config.php file.

When the page reloads, enter your site title, your desired user name, your choice of a password (twice), and your e-mail address.


Also displayed is a check-box asking if you would like your blog to appear in search engines like Google and Technorati.

Leave the box unchecked if you would like your blog to be visible to everyone, including search engines, and check the box if you want to block search engines, but allow normal visitors.

But if you are feeling adventurous, you can also create a new wp-config.php with database constants via the command line:

The best way to do this securely is by reading from password.txt:

$ vi password.txt

Add the password you want to use to this file and then:

$ :wq
$ wp config create --dbhost=local --dbname=$databaseName --dbuser=$databaseUser --prompt=dbpass < password.txt

Please contact our technical support team if you get this error below:

Error: Cannot do 'run_mysql_command': The PHP functions `proc_open()` and/or `proc_close()` are disabled. Please check your PHP ini directive `disable_functions` or suhosin settings.


$ wp core install --url=example.com --title="Example" --admin_user=supervisor --admin_password=strongpassword --admin_email=info@example.com

Note that if you’ve installed WordPress in a subdirectory, then you’ll need to wp option update siteurl after wp core install.

For instance, if WordPress is installed in the /wp directory and your domain is wp.domain_name.com, then you’ll need to run wp option update siteurl http://domain_name/wp for your WordPress installation to function properly.

About MySQL password, it is true that to meet the minimum conditions required for a strong password for MySQL databases, the password must contain at least:

  • Nine characters
  • Two uppercase letters
  • Two lowercase letters
  • Two numbers
  • Two of the following allowed special characters:
     ‘ ~ ! @ # $ % ^ & * ( ) _ - +={}[] / < > , . ; ? ' : | (space)

But if possible, avoid using asterisks (*), periods (.), or any other special characters in your MySQL password. Make it longer though.

If you don't have a Password Manager, visit Dashlane Password Generator to create random passwords in a click.

There is even another way using the --prompt option.

$ wp core config --prompt1/12 --dbname=: $DBName2/12 --dbuser=: $DBUserName3/12 [--dbpass=]: $DBPassword4/12 [--dbhost=]:5/12 [--dbprefix=]:6/12 [--dbcharset=]:7/12 [--dbcollate=]:8/12 [--locale=]:9/12 [--extra-php] (Y/n): n10/12 [--skip-salts] (Y/n): n11/12 [--skip-check] (Y/n): n12/12 [--force] (Y/n): nSuccess: Generated 'wp-config.php' file.

Now let's install WordPress:

$ wp core install --prompt1/6 --url=: https://domain_name.com/2/6 --title=: $WebsiteName3/6 --admin_user=: $WordPressAdminUser4/6 [--admin_password=]: $WordPressAdminPassword5/6 --admin_email=: $WordPressAdminEmailAddress6/6 [--skip-email] (Y/n): nSuccess: WordPress installed successfully.

To be on tyhe safe side, cleanup history:

history -c && exit

For help:

wp core config --help

Manual Install

WordPress is well-known for its ease of installation and its manual installation is no different. Under most circumstances.

In fact, using the guide below, you can install WordPress in less than five minutes from start to completion.

Again, we do offer tools (e.g. Softaculous) to automatically install WordPress for you.

However, if you wish to install WordPress yourself, let's do it with the following guide:

Before you begin the WordPress installation manually, there are a few things you need to have in place:

Here are the steps:

  • create a database in cPanel & a user who has all privileges for accessing and modifying it.
  • visit and download the WordPress package.

    You can also:

    Access the cPanel Terminal interface located at cPanel >> Home >> Advanced >> Terminal or login from you local machine Terminal by using:

    $ cpanel_username@123.456.789.01 (server IP address)


    $ cpanel_username@domain_name.com (if you have setup your DNS correctly)


    $ cpanel_username@server_hostname.com
    cd public_html | public_html/subdomain | public_html/blog | public_html/addon.com

    download WordPress:

    wget https://wordpress.org/latest.tar.gz

    unzip the package using:

    tar -xzvf latest.tar.gz

    You will see a folder called "wordpress" in the same directory that you downloaded latest.tar.gz.

  • unzip it on your local machine.
  • find and rename a file named wp-config-sample.php to wp-config.php, then edit it and add the database information you created.
  • upload the WordPress files to the desired location on your web server:
    • if you want to install WordPress in your root domain (e.g. https://domain_name.com/), move or upload all contents of the unzipped WordPress directory (excluding the WordPress directory itself) into the root directory of your web server.
    • f you want to have your WordPress installation in a sub-domain on your website (e.g. https://sub.domain_name.com/), create the sub-domain in cPanel and upload the contents of the unzipped WordPress package to that location.
    • if you want to have your WordPress installation in its own subdirectory on your website (e.g. https://domain_name.com/blog/), create the blog directory on your server and upload the contents of the unzipped WordPress package to the directory via FTP.
  • run the WordPress installation script by accessing the URL in a web browser.

    This obviously should be the URL where you uploaded the WordPress files.

    • So if you installed WordPress in the root directory, you should visit: https://domain_name.com/
    • if if you installed WordPress in a subdomain, you should visit https://sub.domain_name.com/
    • if you installed WordPress in its own subdirectory called blog, for example, you should visit: https://domain_name.com/blog/

Follow the prompts to complete your WordPress installation.

WordPress 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).

You can use cPanel's WordPress Manager interface at Home >> Applications >> WordPress Manager) to update your WordPress database user's password.

If nothing works, please contact our technical support team.

So which of these options do we recommend that you use?

For most customers, we highly recommend using our WordPress 1-click installer, Softaculous.

There are several advantages to this:

You can see more of the things you can do by visiting our Softaculous Knowledgebase articles.

The seconds best option would be cPanel WordPress Manager.

As you can see from the paragraphs that dealt with this above, the cPanel's WordPress Manager interface allows you to manage the WordPress installations on your cPanel account.

How To Export WordPress Into An XML File

Now that you now have a brand new WordPress installation up and running, you may want to import any WordPress website that you have or one hosted with WordPress.com

In the Configure section of the WordPress.com site dashboard (the lefthand side menu), there is a gear icon labeled Settings.

If you scroll down to the bottom of the page, under Site Tools, there’s an Export option that allows you to download an XML version of your site. XML, or extensible markup language, is a language that sets rules for encoding documents in a human-readable and machine-readable format.

This file will contain the necessary data to import your previous site data into your new site location, so make sure not to alter or delete this file.


Make sure to export both your content and media library to get all of your files ready for transfer.

Exporting your content will create the XML file, and exporting media library will create a .tar file with your media inside.


We only have a few more steps to go before your data is imported into your new WordPress installation!

Just follow these instructions and let the WordPress Import function do the work for you.

  1. Log into your WordPress site as an administrator (these are the credentials you saved when creating the new installation)
  2. Go to Tools: Import in the WordPress Admin Panel
  3. Install the WordPress Importer from the list
  4. Activate and Run Importer
  5. Upload this file (the XML) using the form provided on that page
  6. Map the author in the XML to users on the site (either the Administrator user you created or another user you may choose to create)

When importing the content into your new WordPress installation, make sure to check the Download and import file attachments box to include media such as images from the posts in the import.

WordPress will then import each of your posts, pages, comments, categories, etc. contained in the XML to this site

(Note: when being asked to import the author, you can maintain the old author name from the WordPress.com blog or choose the admin name created when you installed WordPress)

WordPress Documentations

WordPress Codex: an online manual for WordPress and a living repository for WordPress information and documentation.
WordPress Forum: A variety of resources and categories for support (i.e. installation, accessibility, networking, etc.)
Theme Handbook: WordPress Theme Developer Handbook.
Best Practices: A series of best practices to help keep WordPress code clean and well documented.
Environment Setup: Configuring a local environment to work on your WordPress theme.
Installing A Server: Tutorials for the process of installing one of the four local server programs.
Installing WordPress: One page installation guide in a 5-step process.
Debugging: This page describes the various debugging tools in WordPress, which comes with specific debug systems that is standard among the core, plugins and themes.
WordPress Command Line: The command-line interface for WordPress where you can update plugins, configure multisite installs and much more, without using a web browser.
Homebrew: Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn’t include with macOS.
Composer: A tool for dependency management in PHP.
Codeception: Codeception collects and shares best practices and solutions for testing PHP web applications.
Codeception for WordPress: Codeception package for testing WordPress.
WP-Browser: Github source for WP-Browser.
Ansible: Ansible documentation.

Do you want to use WordPress for your website or e-commerce online shop?
Webmail Hosting
AWS Hosting
Secure PHP Hosting
cPanel & WHM Hosting
Red Hat Hosting with cPanel
Linux Hosting with cPanel
Softaculous Hosting