
On cPanel hosting you can install WordPress in two ways. You can run the one-click installer your host provides, or you can upload the files and create the database yourself. This guide shows how to install WordPress both ways, lists the checks to make afterwards, and ends with a short note on running WordPress on your own computer.
Key takeaways
- A one-click installer such as WP Toolkit or Softaculous creates the database, copies the files and sets up the admin account for you.
- The manual method has five steps. You download WordPress, create a database, upload the files, add the database details and run the install script.
- WordPress recommends PHP 8.3 or greater, MySQL 8.0 or MariaDB 10.11 or greater, and HTTPS support.
- If the install script reports a database error, check the database name, username and password in
wp-config.phpfirst. - A localhost install is for testing and development. Visitors cannot reach it until you move the site to a web host.
What you need before you install WordPress
Have these ready before you start.
- A domain name that points to your hosting account. If you do not have one yet, you can register a domain first.
- A hosting account with cPanel access, plus your cPanel username and password.
- A server that meets the WordPress requirements in the table below.
| Requirement | What WordPress recommends |
|---|---|
| PHP | Version 8.3 or greater |
| Database | MySQL 8.0 or greater, or MariaDB 10.11 or greater |
| Connection | HTTPS support |
| Web server | Apache or Nginx, although any server that supports PHP and MySQL works |
WordPress still runs on PHP 7.4 and MySQL 5.5.5, but the project warns that those versions have reached end of life and may expose your site to security problems. Check your PHP version before you install.
Every WaseerHost hosting plan uses cPanel and includes a free SSL certificate, and you can select PHP 8.0 to 8.5 for each site in cPanel. See WordPress hosting for current plans and PHP hosting for the version details.
Which install method should you use?
| Method | Best for | Your part |
|---|---|---|
| One-click installer | Most new sites | Fill in one form |
| Manual install | Hosts without an installer, or when you want full control of the database and files | Create the database, upload the files, run the install script |
| Localhost | Learning, testing themes and plugins | Install a local app on your computer |
How to install WordPress with a one-click installer
Which installer you see depends on your hosting provider. The two you are most likely to meet in cPanel are WP Toolkit and Softaculous. Both ask for the same basic details, so the steps below also work as a guide for other installers.
Install WordPress with WP Toolkit
WP Toolkit is the WordPress manager built into cPanel. Your host can turn it on or off, so it may be missing from your account.
- Log in to cPanel.
- In the Domains section, open WP Toolkit.
- Click Install.
- To accept the defaults and install the latest version of WordPress, click Install again. To change the defaults first, such as the WordPress version, the database name or the automatic update settings, edit those fields and then click Install.
- When the installer finishes, the new site appears in the WP Toolkit list of WordPress installations.
Install WordPress with Softaculous
- Log in to cPanel and click the Softaculous icon.
- Search for WordPress and open its page.
- Click Install to show the install form.
- Under Choose Installation URL, pick your domain. Leave the In Directory field blank to install WordPress on the domain itself, for example
example.com. If you typewpin that field, your site will live atexample.com/wpinstead. - Fill in Admin Username, Admin Password and Admin Email, then choose a language under Select Language.
- Click Install and wait for the success message. From there you can open your site and the WordPress admin panel.
Use a long, unique admin password and an email address you can read.
How to install WordPress manually in cPanel
The manual method follows the same five steps that WordPress documents in its own install guide. The cPanel screens below replace the FTP and phpMyAdmin steps in that guide.
Step 1: download WordPress
Go to wordpress.org/download and download the latest version. Keep the .zip file as it is. You will extract it on the server.
Step 2: create a database and user
WordPress stores your posts, pages and settings in a database. cPanel has a wizard that creates the database and its user in one pass.
- In the cPanel Databases section, open Database Wizard. Older cPanel versions call it MySQL Database Wizard.
- Enter a name in the New Database box and click Next Step.
- Enter a name in the Username box. Type a password twice, or click Password Generator to create a strong one.
- Click Create User.
- Select ALL PRIVILEGES and click Next Step.
The wizard gives the new user access to the database, so you do not need a separate "add user to database" step.
Write down the database name, the username and the password. Many hosts add your cPanel username and an underscore to the front of both names, so the full names look like example_wp and example_wpuser. You need the full names later.
Step 3: upload the WordPress files
- In the cPanel Files section, open File Manager.
- Open the document root of your domain. For the main domain of the account this is
public_html. - Click Upload and select the WordPress
.zipfile. File Manager cannot upload a folder, which is why you upload the archive. - Back in File Manager, select the
.zipfile and click Extract. The files land in a new folder calledwordpress. - Open the
wordpressfolder and select everything inside it. Click Move, enter the path of the document root, for example/public_html, and click Move File(s). - Delete the empty
wordpressfolder and the.zipfile.
Do not skip the move. WordPress says to upload the contents of the wordpress directory but not the directory itself when you want the site at the root of your domain. If you leave the files in the wordpress folder, your site loads at example.com/wordpress.
Step 4: add the database details to wp-config.php
This step is optional. If you skip it, the install script in step 5 asks for the database details and tries to create the file for you. To do it yourself, follow these steps.
- In File Manager, select the file
wp-config-sample.php, click Rename and change the name towp-config.php. - Select
wp-config.phpand click Edit. - Replace the placeholder values with the details from step 2.
define( 'DB_NAME', 'example_wp' );
define( 'DB_USER', 'example_wpuser' );
define( 'DB_PASSWORD', 'your-database-password' );
define( 'DB_HOST', 'localhost' );The value of DB_HOST is usually localhost, but not always. Ask your host if localhost does not work. Leave DB_CHARSET and DB_COLLATE as they are.
Further down, the file has a block of authentication keys and salts. Open the WordPress secret key service in your browser, copy the lines it generates, and paste them over the placeholder lines.
https://api.wordpress.org/secret-key/1.1/salt/Save the file.
Step 5: run the install script
Open the install address in your browser. Replace example.com with your own domain.
https://example.com/wp-admin/install.phpIf you installed WordPress in a subdirectory called blog, use https://example.com/blog/wp-admin/install.php.
If WordPress cannot find wp-config.php, it offers to create the file and asks for your database details. After that, the install screen asks for these details.
- Site title
- Username for the admin account
- Password
- Email address
- Search engine visibility
Leave the search engine box unchecked if you want search engines such as Google to list your site. Check it only while you build a site you do not want found yet. You can change all of these values later in the WordPress dashboard.
When the install succeeds, WordPress shows a login prompt. Log in with the username and password you just chose.
What to check after the install
- Load your site with
https://at the start of the address. If the browser shows a certificate warning, open SSL/TLS Status in the cPanel Security section and check that your domain has a certificate. - Log in to the dashboard and confirm that the site title and admin email are correct.
- Confirm that the search engine setting matches what you want. A site with that box checked blocks search engines.
- Remove the WordPress
.zipfile from the server if it is still there.
If you already have a WordPress site at another host, you do not need a fresh install. WaseerHost offers free website migration to move an existing site.
Fix common installation problems
Error establishing a database connection
WordPress cannot log in to the database. Open wp-config.php and compare the database name, username and password with the ones in your cPanel account. On cPanel hosting, check that you used the full names with the prefix. To set a new password for the database user, open Manage My Databases in the cPanel Databases section, then put the same password in wp-config.php. Also confirm that the user has privileges on that database.
You see a list of files instead of your site
The web server does not load index.php by default. WordPress suggests that you create a file named .htaccess in the install directory with this line.
DirectoryIndex index.phpTo see files that start with a dot in File Manager, click Settings and select Show Hidden Files (dotfiles).
"Headers already sent" errors
You probably introduced a syntax error when you edited wp-config.php. Open the file and check that the first line contains only <?php, with no text or blank space before it. Save the file and reload the page.
The page shows PHP code
If you see raw <?php ?> tags in the browser, PHP is not running for your site. Check that your hosting account meets the WordPress requirements, or ask your hosting provider to look at the PHP setup.
A second WordPress site breaks the first one
cPanel's documentation says each document root may hold only one WordPress installation, because two installs in one directory can conflict in the .htaccess file. Put a second site in its own subdirectory, subdomain or addon domain.
How to install WordPress on localhost
A localhost install runs WordPress on your own computer. WordPress describes local installs as meant for development, so use one to learn the dashboard or to test a theme before you pay for hosting.
The WordPress developer handbook lists several free tools for this. WordPress Studio is an open-source app that installs and manages local sites. XAMPP and MAMP are free local development environments. With either one you create a local database and run the same WordPress install script that the manual steps in this guide use.
If you only want to try WordPress, open WordPress Playground. It is a live demo that runs in your browser.
Nobody else can visit a site that lives on your computer. When you are ready to publish it, you need web hosting and a domain, and you then install WordPress on the server or move your local site there.
Frequently asked questions
Yes. WordPress is free, open-source software, and you can download it from wordpress.org at no charge. A live site still needs a domain name and a hosting account, and those cost money. A localhost install costs nothing.

Written by
Founder & CEO
Founder and CEO of Wasevo LLC, the company that runs WaseerHost. He works on cPanel/WHM servers, WHMCS billing and the Next.js storefront.


