Hosting

How to install WordPress on cPanel, step by step

We walk you through installing WordPress on cPanel two ways: with the app installer in a few clicks, or by hand, creating the database and uploading the files. Then you configure the essentials and fix the most frequent errors.

HostSpace team

7 min read

Article cover: How to install WordPress on cPanel, step by step

Key takeaways

  • With Softaculous or WP Toolkit you can install WordPress in about five minutes.
  • Install with https:// from the start and never use “admin” as the username.
  • Most connection errors come from a typo in wp-config.php.
  • Set up permalinks, backups and security before you publish.
Article contents

Before you start

WordPress is the most widely used content management system in the world, and it runs very well on cPanel hosting. Before installing it, make sure you have three things ready:

  • cPanel access. Your username and password are in the welcome email you received when you signed up for your plan.
  • Your domain pointing to the hosting. If you haven't done it yet, follow our guide to point your domain to your hosting. You can install first, but you won't see the site at yourbusiness.com until the domain resolves.
  • An active SSL certificate. That way you install WordPress with https:// from the start and avoid changing URLs later. See how to install free SSL on cPanel.

There are two ways to install it. Pick the one that suits you:

Ways to install WordPress on cPanel
MethodTimeWhat it does
App installerAbout 5 minutesCreates the database, copies the files and configures everything for you.
Manual install15 to 20 minutesFull control: you create the database, upload the files and run the setup wizard.

Option 1: install with the app installer

Depending on your plan, cPanel includes Softaculous or WP Toolkit. Both do the same job: they install WordPress in a few clicks. The steps are very similar:

  1. Log in to cPanel and search for WordPress, Softaculous or WP Toolkit in the search bar.
  2. Click Install.
  3. Choose https:// as the protocol and, if offered, the version with or without www. What matters is picking one and sticking with it.
  4. Select your domain and leave the directory field empty so the site lives at the root (yourbusiness.com, not yourbusiness.com/wp).
  5. Enter the site name and a short tagline; you can change both later.
  6. Create the administrator user. Don't use “admin”: it is the first name automated attacks try. Use a long password and a real email address so you can recover access.
  7. Choose the language and confirm the installation.

In a minute or two you'll see your site address and the admin dashboard address, which is usually https://yourbusiness.com/wp-admin.

Option 2: manual install

If your plan has no installer or you prefer to do it yourself, a manual install has three phases: database, files and setup wizard.

1. Create the database

  1. In cPanel, open MySQL Database Wizard.
  2. Type a database name. cPanel adds your account username as a prefix, for example user_wp.
  3. Create a database user with a generated password and save it; you'll need it in a few minutes.
  4. Tick ALL PRIVILEGES and finish the wizard.

2. Upload the files

  1. Download the latest version as a ZIP from wordpress.org.
  2. In cPanel, open File Manager and go to public_html.
  3. Upload the ZIP, right-click it and choose Extract.
  4. A wordpress folder is created. Open it, select everything inside and move it to public_html. Then delete the empty folder and the ZIP.

3. Run the setup wizard

  1. Visit https://yourbusiness.com. WordPress detects that the configuration is missing and opens the wizard.
  2. Enter the database name, user and password you created. Leave Database Host as localhost, which is standard on cPanel.
  3. Change the wp_ table prefix to something else, such as yb24_. It isn't required, but it makes some automated attacks harder.
  4. WordPress creates the wp-config.php file. If it lacks permission, it shows you the contents so you can paste them into a new file with that name.
  5. Fill in the site title and the admin user (again: not “admin”).

If you'd rather create wp-config.php by hand, copy wp-config-sample.php and edit these lines:

wp-config.php
define( 'DB_NAME', 'user_wp' );
define( 'DB_USER', 'user_wpuser' );
define( 'DB_PASSWORD', 'your-strong-password' );
define( 'DB_HOST', 'localhost' );

In the same file, replace the security keys (AUTH_KEY and the rest) with fresh ones generated at api.wordpress.org/secret-key/1.1/salt/.

First settings after installing

Before publishing content, spend ten minutes getting your site properly set up:

  1. Permalinks. Under Settings > Permalinks, choose Post name. Your URLs become readable, which helps SEO.
  2. Delete the sample content. Remove the “Hello world!” post, the sample page and the test comment.
  3. Check the site address. Under Settings > General, confirm both URLs start with https://.
  4. Update everything. Under Dashboard > Updates, install anything pending and delete themes and plugins you won't use.
  5. Set up backups. Use your hosting backups or a backup plugin, and keep a copy off the server. Learn how in website backups.
  6. Add security. Install a security plugin, turn on two-factor authentication and limit login attempts. Review our WordPress security guide.

Common errors and how to fix them

“Error establishing a database connection”

WordPress can't connect to the database. It is almost always a typo in wp-config.php:

  • Check that the database name and user include the cPanel prefix.
  • Confirm in MySQL Databases that the user is added to the database with all privileges.
  • If you're unsure about the password, change it there and update the file.

White screen

The infamous “white screen of death” is usually a PHP error, most often caused by an incompatible plugin or theme. Rename the wp-content/plugins folder in File Manager to disable all plugins and reload the site. If it comes back, reactivate them one by one. Also check in MultiPHP Manager that you are on a current, supported PHP version.

The hosting's default page shows up

If your domain shows a generic page instead of WordPress, it may be because:

  • There is an index.html in public_html that takes priority over index.php.
  • You installed into a subfolder and need to visit yourbusiness.com/folder.
  • Your domain still points to another server or DNS propagation hasn't finished.

Frequently asked questions

With Softaculous or WP Toolkit, about five minutes. A manual install takes 15 to 20 minutes, including creating the database and uploading the files.

Yes, you can install it on your hosting, but you won’t see the site on your domain until it points to the server and DNS propagation finishes.

Check the database name, user and password in wp-config.php, including the cPanel prefix, and confirm the user has all privileges on the database.

Yes, if your plan allows multiple domains. Each site is installed in its domain’s folder and uses its own database.

HostSpace team

We provide hosting, domains, VPS servers and business email with Spanish-speaking support. We write about what our customers ask us most.