Table of Contents
WordPress installation on cPanel is straightforward if done correctly. This guide covers the clean, manual way — no bloated auto-installers, no hidden configs, no shortcuts that break later.
Step 1: Log in to cPanel
Access cPanel using:
https://your-domain.com:2083
or the URL provided by your hosting provider.
Step 2: Create a Database and User
Go to MySQL® Databases.
Create a database:
-
Database Name:
wp_db
Create a database user:
-
Username:
wp_user -
Password: use a strong password
Assign the user to the database and grant ALL PRIVILEGES.
Step 3: Download WordPress
Go to File Manager → public_html.
Download WordPress:
wget https://wordpress.org/latest.zip
Extract it:
unzip latest.zip
Move files to root (if needed):
mv wordpress/* .
rm -rf wordpress latest.zip
Step 4: Set Correct File Permissions
In File Manager or via terminal:
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
This prevents permission-related issues later.
Step 5: Configure wp-config.php
Rename config file:
cp wp-config-sample.php wp-config.php
Edit it and set database details:
define('DB_NAME', 'wp_db');
define('DB_USER', 'wp_user');
define('DB_PASSWORD', 'your_password');
define('DB_HOST', 'localhost');
Generate security keys from:
https://api.wordpress.org/secret-key/1.1/salt/
Paste them into wp-config.php.
Step 6: Run the WordPress Installer
Open your site in a browser:
https://your-domain.com
Fill in:
-
Site title
-
Admin username (not
admin) -
Strong password
-
Admin email
Click Install WordPress.
Step 7: Enable HTTPS (Mandatory)
Go to SSL/TLS Status in cPanel.
Install a free Let’s Encrypt SSL certificate.
Then update WordPress URLs:
-
Settings → General
-
Change both URLs to
https://
Step 8: Basic Post-Install Hardening
Delete default plugins and themes you don’t use.
Disable file editing:
define('DISALLOW_FILE_EDIT', true);
(Optional) Force HTTPS:
define('FORCE_SSL_ADMIN', true);
If you rely only on auto-installers, you won’t understand your WordPress setup when something breaks. Manual installation takes 5 minutes longer — and saves hours later when you actually need control.
