WP AI Agent
Features Pricing Blog Contact Download Plugin Manage Subscription Get Free Key →

How to Install WordPress on cPanel Hosting: Complete Step-by-Step Guide

· · 8 min read

Installing WordPress on cPanel hosting is one of the most common tasks any website owner will face, and the good news is that cPanel makes the entire process straightforward whether you are a complete beginner or an experienced developer. In this guide, you will learn every method available — from the popular one-click Softaculous installer to a fully manual installation — so you can choose the approach that best fits your skill level and requirements.

What You Need Before You Begin

Before you start the installation process, make sure you have everything in place. Jumping in without preparation is the most common reason installations fail or take longer than expected.

Hosting Account Requirements

  • Active cPanel hosting account — Any shared, VPS, or dedicated plan that includes cPanel will work.
  • PHP 7.4 or higher — WordPress officially recommends PHP 8.0+. Check your cPanel's PHP selector.
  • MySQL 5.7+ or MariaDB 10.3+ — Required for the WordPress database.
  • HTTPS/SSL certificate — Most hosts provide a free Let's Encrypt certificate via cPanel.

Domain and DNS

Your domain must be pointed to your hosting provider's nameservers before the installation will be publicly accessible. DNS propagation can take up to 48 hours, but typically resolves within a few hours. Log in to your domain registrar and update the nameservers to the values provided by your host if you have not done so already.

Login Credentials You Will Need

  • cPanel username and password
  • Your hosting account's cPanel URL (usually yourdomain.com/cpanel or yourdomain.com:2083)

Method 1: Installing WordPress Using Softaculous (Recommended for Beginners)

Softaculous is the most widely used auto-installer on cPanel hosting. It handles the database creation, file copying, and initial configuration automatically, reducing a multi-step process to a few form fields.

Step 1 — Access Softaculous in cPanel

  1. Log in to your cPanel account at yourdomain.com/cpanel.
  2. Scroll down to the Software section.
  3. Click the Softaculous Apps Installer icon.
  4. In the Softaculous dashboard, click WordPress from the top scripts list or search for it in the search bar.
  5. Click the blue Install Now button.

Step 2 — Configure the Installation Settings

  1. Choose Protocol: Select https:// if you have an SSL certificate (recommended).
  2. Choose Domain: Select the domain where you want WordPress installed from the dropdown.
  3. In Directory: Leave this field blank to install WordPress in the root (e.g., yourdomain.com). Type a folder name like blog to install it at yourdomain.com/blog.
  4. Site Name and Description: Enter your website's name and a short tagline. You can change these later inside WordPress.
  5. Admin Username: Choose a unique username — never use admin as it is a common target for brute-force attacks.
  6. Admin Password: Use a strong password with uppercase letters, numbers, and symbols.
  7. Admin Email: Enter a valid email address. WordPress sends password resets and notifications here.

Step 3 — Advanced Options (Optional but Useful)

Expand the Advanced Options section to customise the database name and table prefix. Changing the default table prefix from wp_ to something like site7_ adds a small layer of security against SQL injection attacks. You can also enable automated backups and updates from this panel.

Step 4 — Complete the Installation

  1. Scroll to the bottom and click Install.
  2. Softaculous will display a progress bar. The process typically takes 30 to 60 seconds.
  3. Once finished, you will see a confirmation screen with links to your new WordPress site and the admin dashboard (yourdomain.com/wp-admin).
  4. Click the admin link and log in with the credentials you set in Step 2.

Method 2: Installing WordPress Manually via cPanel

A manual installation gives you full control over every file and database setting. It is the preferred method for developers who want a clean install without any auto-installer extras, and it is an essential skill for troubleshooting purposes.

Step 1 — Create a MySQL Database and User

  1. In cPanel, navigate to Databases and click MySQL Databases.
  2. Under Create New Database, enter a database name (e.g., mysite_wp) and click Create Database.
  3. Scroll down to MySQL Users, enter a new username and a strong password, then click Create User.
  4. Under Add User To Database, select your new user and database from the dropdowns and click Add.
  5. On the privileges screen, tick All Privileges and click Make Changes.

Step 2 — Download and Upload WordPress Files

  1. Go to wordpress.org/download and download the latest WordPress ZIP file to your computer.
  2. Back in cPanel, open the File Manager.
  3. Navigate to the public_html directory (or a subdirectory if installing in a folder).
  4. Click Upload in the top toolbar and upload the WordPress ZIP file.
  5. Once uploaded, right-click the ZIP file and select Extract. This creates a wordpress folder.
  6. Open the extracted wordpress folder, select all files (Ctrl+A or Edit > Select All), and click Move to move them one level up into public_html.
  7. Delete the now-empty wordpress folder and the original ZIP file to keep things tidy.

Step 3 — Create and Configure wp-config.php

  1. In File Manager, locate the file named wp-config-sample.php in public_html.
  2. Right-click it and select Copy, then rename the copy to wp-config.php.
  3. Right-click wp-config.php and click Edit.
  4. Update the database credentials section with the values you created in Step 1:
// ** Database settings ** //
define( 'DB_NAME',     'mysite_wp' );       // Your database name
define( 'DB_USER',     'mysite_user' );     // Your database username
define( 'DB_PASSWORD', 'Str0ng!Pass#99' );  // Your database password
define( 'DB_HOST',     'localhost' );       // Usually localhost on cPanel
define( 'DB_CHARSET',  'utf8mb4' );
define( 'DB_COLLATE',  '' );

// Change the table prefix to improve security
$table_prefix = 'site7_';

// Force HTTPS for all admin and front-end pages
define( 'FORCE_SSL_ADMIN', true );
  1. Replace the placeholder Authentication Keys and Salts block with fresh values from https://api.wordpress.org/secret-key/1.1/salt/.
  2. Save the file.

Step 4 — Run the WordPress Installation Wizard

  1. Open a browser and visit yourdomain.com (or yourdomain.com/wp-admin/install.php if it does not redirect automatically).
  2. Select your language and click Continue.
  3. Fill in your site title, admin username, password, and email address.
  4. Click Install WordPress.
  5. On the success screen, click Log In and use your new credentials to access the dashboard.

Method 3: Installing WordPress with WP-CLI via cPanel Terminal

If your cPanel plan includes SSH access or a terminal, WP-CLI is the fastest and most powerful way to install WordPress. It is ideal for developers managing multiple sites and for automated deployments.

Accessing the Terminal in cPanel

  1. In cPanel, scroll to the Advanced section and click Terminal.
  2. Accept any security warning displayed on screen.
  3. You are now in your hosting account's command-line shell.

Running WP-CLI Commands

Use the following sequence of commands to download, configure, and install WordPress entirely from the terminal. Replace the placeholder values with your own database and site details.

# Navigate to your public web root
cd ~/public_html

# Download the latest WordPress core files
wp core download

# Create the wp-config.php file automatically
wp config create \
  --dbname=mysite_wp \
  --dbuser=mysite_user \
  --dbpass=Str0ng!Pass#99 \
  --dbhost=localhost \
  --dbprefix=site7_

# Run the WordPress database installation
wp core install \
  --url=https://yourdomain.com \
  --title="My WordPress Site" \
  --admin_user=myadmin \
  --admin_password=AdminPass#2024 \
  [email protected]

# Verify the installation was successful
wp core version

Within seconds you will see a success message confirming WordPress is installed and the version number will be printed. You can then log in at yourdomain.com/wp-admin.

Post-Installation Steps to Secure and Optimise Your WordPress Site

A fresh WordPress installation is just the beginning. Taking a few minutes to run through these post-installation tasks will significantly improve your site's security and performance from day one.

Essential Security Hardening

  • Delete default content: Remove the sample post, page, and comment that WordPress creates by default.
  • Set correct file permissions: Directories should be 755 and files should be 644. Never set files to 777.
  • Install a security plugin: Wordfence or Solid Security (formerly iThemes Security) add firewall rules, login protection, and malware scanning.
  • Enable two-factor authentication: Add 2FA to your admin account immediately after installation.
  • Change the admin URL: Move /wp-admin to a custom path using a plugin like WPS Hide Login.

Performance Optimisation

  • Install a caching plugin: WP Super Cache or W3 Total Cache are free and work well on cPanel shared hosting.
  • Enable Gzip compression: Add the relevant .htaccess rules or use your cPanel's Optimize Website feature.
  • Use a CDN: Cloudflare's free plan integrates with cPanel and dramatically speeds up asset delivery worldwide.
  • Optimise images: Install Smush or ShortPixel to compress images on upload automatically.

Choosing a Theme and Essential Plugins

Navigate to Appearance > Themes to install a theme. For beginners, the free Astra or Kadence themes are lightweight and compatible with all major page builders. For plugins, start minimal: an SEO plugin (Yoast SEO or Rank Math), a backup plugin (UpdraftPlus), and a contact form plugin (WPForms Lite) cover the majority of use cases for new sites.

Troubleshooting Common WordPress Installation Errors on cPanel

Even with a straightforward process, errors can occur. Here are the most frequently encountered problems and how to resolve them quickly.

Error Establishing a Database Connection

This error means WordPress cannot connect to MySQL. Open wp-config.php and double-check that DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST are all correct. On some cPanel hosts, DB_HOST must be set to a specific hostname rather than localhost — check your hosting provider's documentation or the Remote MySQL section in cPanel for the correct host string.

White Screen of Death (WSOD)

A blank white screen is usually caused by a PHP memory limit that is too low or a plugin conflict. In cPanel's PHP Selector or MultiPHP INI Editor, increase memory_limit to 256M. If the issue persists, enable WordPress debug mode by adding define( 'WP_DEBUG', true ); to wp-config.php temporarily to reveal the underlying error.

500 Internal Server Error

This is most commonly caused by a corrupt .htaccess file. In File Manager, rename .htaccess to .htaccess_old, then go to Settings > Permalinks in WordPress and click Save Changes to regenerate a fresh .htaccess file.

Incorrect File Permissions

If you see permission denied errors, select all files in public_html in File Manager, click Change Permissions, and set files to 644 and directories to 755. You can also do this via SSH with find . -type f -exec chmod 644 {} \; and find . -type d -exec chmod 755 {} \;.

Frequently Asked Questions

How long does it take to install WordPress on cPanel?

Using Softaculous, the installation takes less than two minutes once you have filled in the configuration form. A manual installation typically takes 10 to 20 minutes for someone doing it for the first time, and under five minutes for experienced users. WP-CLI is the fastest method, completing the entire process in under 30 seconds once you are in the terminal.

Can I install WordPress on a subdomain using cPanel?

Yes. First create the subdomain in cPanel under Domains > Subdomains (or the Domains section in newer cPanel versions). This generates a dedicated folder such as public_html/blog. Then follow either the Softaculous or manual installation method, selecting or navigating to that subdomain folder as your installation target.

Do I need to create a database manually when using Softaculous?

No. Softaculous automatically creates the MySQL database and user for you as part of the installation process. You only need to create the database manually when performing a manual installation or using WP-CLI with a pre-existing database setup.

Is it safe to install WordPress on shared cPanel hosting?

Yes, millions of WordPress sites run on shared cPanel hosting safely. The key is to keep WordPress core, themes, and plugins updated, use strong passwords, enable two-factor authentication, install a security plugin, and take regular backups. Many hosts also offer free malware scanning and firewall protection built into cPanel as an added layer of defence.

Installing WordPress on cPanel hosting is a skill that quickly becomes second nature, and with the methods covered in this guide — Softaculous for speed, manual installation for control, and WP-CLI for power users — you have everything you need to get any site live confidently. Once your site is up and running, consider using WP AI Agent, an AI-powered chat tool that lets you manage WordPress tasks like plugin installation, content creation, theme customisation, and performance checks through simple natural-language commands, saving you time and eliminating the need to dig through dashboards manually.

Ready to manage WordPress with AI?

Get 100,000 tokens free every month. No credit card required.

Get Your Free License Key →

More from the blog