Skip to content
Back to Blog
WordPress10 min read

Install WordPress cPanel: Troubleshooting Common Errors (2026)

Step-by-step fixes for the most frequent WordPress installation errors in cPanel, from database connection failures to file permission issues and Softaculous problems.

Written by Abdul AbrorTechnical Hosting Support Engineer
Install WordPress cPanel: Troubleshooting Common Errors (2026)
On this page

Installing WordPress through cPanel should be straightforward, but real-world hosting environments introduce variables that cause installations to fail or behave unexpectedly. This guide walks through the most common WordPress installation errors in cPanel environments, their root causes, and the exact steps to resolve them.

Error Establishing a Database Connection

Symptoms

After installing WordPress through Softaculous or manually, you see a white page with "Error establishing a database connection" when you visit your site. The cPanel installation appeared to complete successfully.

Root Cause

The wp-config.php file contains incorrect database credentials, or the database user lacks the necessary privileges. This happens when:

  • The MySQL database username or password was typed incorrectly during setup
  • The database user was not properly linked to the database in cPanel
  • The database host is wrong (usually localhost but some hosts use a different value)
  • The database prefix conflicts with an existing installation

The Fix

Step 1: Verify database credentials in cPanel

Log into cPanel and navigate to MySQL Databases. Confirm:

  • The database name exists and matches what you specified
  • The database user exists
  • The user is added to the database with ALL PRIVILEGES

If the user is not linked, use the "Add User To Database" section and grant all privileges.

Step 2: Check wp-config.php

Use cPanel File Manager to open public_html/wp-config.php (or wherever you installed WordPress). Verify these lines:

define( 'DB_NAME', 'your_database_name' );
define( 'DB_USER', 'your_database_user' );
define( 'DB_PASSWORD', 'your_database_password' );
define( 'DB_HOST', 'localhost' );

The database name in cPanel typically includes your cPanel username as a prefix (e.g., cpuser_wpdb). The same applies to the database user (e.g., cpuser_wpuser).

Step 3: Test the database host

If localhost doesn't work, some shared hosting providers use a different hostname. Check your hosting documentation or try common alternatives:

define( 'DB_HOST', '127.0.0.1' );
// or
define( 'DB_HOST', 'localhost:3306' );

Step 4: Verify MySQL is running

If you have SSH access or WHM access, confirm MySQL is running:

systemctl status mysql
# or
systemctl status mariadb

On shared hosting without root access, contact your hosting provider if none of the above steps resolve the issue.

Installation Directory Already Exists

Symptoms

Softaculous or another auto-installer refuses to proceed, showing an error like "The directory already exists" or "Installation path is not empty."

Root Cause

The target directory contains files from a previous installation attempt, an old backup, or default cPanel placeholder files. Auto-installers will not overwrite existing content for safety reasons.

The Fix

Step 1: Check what's in the directory

Use cPanel File Manager to navigate to the installation path (typically public_html). Look for:

  • WordPress core files (wp-admin, wp-content, wp-includes)
  • Previous installation remnants
  • Default cPanel index files

Step 2: Back up if necessary

If the directory contains anything you might need later, download it or move it to a backup folder:

  1. Select all files in File Manager
  2. Click Compress and create a .zip archive
  3. Download the archive
  4. Delete the original files

Step 3: Clean the directory

Delete all files and folders in the target directory, including hidden files. In File Manager, click Settings (top right) and enable "Show Hidden Files" to see .htaccess and other dotfiles.

Step 4: Retry the installation

Return to Softaculous or your installer and proceed with a fresh installation.

403 Forbidden Error After Installation

Symptoms

WordPress installs successfully, but visiting the site shows "403 Forbidden - You don't have permission to access this resource."

Root Cause

Incorrect file or directory permissions, missing index file, or restrictive .htaccess rules prevent the web server from serving your WordPress files.

The Fix

Step 1: Verify index.php exists

In cPanel File Manager, confirm index.php exists in your WordPress root directory. If it's missing, your installation is incomplete or corrupted.

Step 2: Check file permissions

WordPress requires specific permissions:

  • Directories: 755 (drwxr-xr-x)
  • Files: 644 (-rw-r--r--)
  • wp-config.php: 640 or 600 for tighter security

To fix permissions in File Manager:

  1. Select all files and folders
  2. Click Permissions
  3. Set directories to 755 and files to 644

If you have SSH access, use these commands from your WordPress root:

find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
chmod 640 wp-config.php

Step 3: Check .htaccess

A corrupted or overly restrictive .htaccess file can block access. Temporarily rename it:

  1. In File Manager, locate .htaccess (enable "Show Hidden Files")
  2. Rename it to .htaccess.bak
  3. Try accessing your site

If the site works, regenerate .htaccess by logging into WordPress admin and navigating to Settings → Permalinks, then clicking Save Changes without making any changes.

Step 4: Verify ownership

On VPS or dedicated servers, file ownership matters. Files should be owned by the web server user or your cPanel account user. Check with:

ls -la

If files are owned by root or another user, change ownership:

chown -R cpanel_username:cpanel_username /home/cpanel_username/public_html

Softaculous Installation Fails Silently

Symptoms

Softaculous shows "Installing..." then returns to the installation form without error messages, or shows a generic "Installation failed" message with no details.

Root Cause

This typically occurs when:

  • PHP requirements are not met (version too old, missing extensions)
  • Disk quota is exceeded
  • Database creation fails due to MySQL user limits
  • The installation script times out

The Fix

Step 1: Check PHP version

WordPress requires PHP 7.4 or higher (8.0+ recommended). In cPanel:

  1. Go to MultiPHP Manager
  2. Select your domain
  3. Ensure PHP version is 7.4 or higher

Step 2: Verify disk space

In cPanel sidebar, check the "Disk Usage" meter. If you're at or near 100%, you need to free up space or upgrade your plan.

To find large files:

  1. Go to Disk Usage in cPanel
  2. Review which directories consume the most space
  3. Delete old backups, logs, or unused files

Step 3: Check database limits

Shared hosting plans often limit the number of MySQL databases. In cPanel MySQL Databases, check if you've reached your limit. If so:

  • Delete unused databases
  • Upgrade your hosting plan
  • Use an existing database with a unique table prefix

Step 4: Review Softaculous logs

In Softaculous:

  1. Go to Softaculous → Installations
  2. Look for failed installation entries
  3. Click details to view error logs

Common logged errors include timeout issues or missing PHP extensions.

Step 5: Manual installation fallback

If Softaculous continues to fail, install WordPress manually:

  1. Download WordPress from wordpress.org
  2. Upload via cPanel File Manager
  3. Create database and user in cPanel
  4. Run the WordPress installer by visiting yourdomain.com/wp-admin/install.php

White Screen of Death After Installation

Symptoms

WordPress installs, but visiting the site or admin area shows a completely blank white page with no error message.

Root Cause

A PHP fatal error is occurring, but error display is disabled in production environments. Common causes:

  • Memory limit too low
  • Incompatible PHP version
  • Corrupted core files
  • Plugin or theme conflict (if installed during setup)

The Fix

Step 1: Enable error reporting

Add these lines to the top of wp-config.php (after the opening <?php):

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );

Reload the page to see the actual error message.

Step 2: Increase PHP memory limit

In wp-config.php, add:

define( 'WP_MEMORY_LIMIT', '256M' );

Place this line before the /* That's all, stop editing! */ comment.

Step 3: Verify PHP version compatibility

Some hosting configurations default to very old PHP versions. Ensure your domain uses PHP 7.4 or higher via MultiPHP Manager in cPanel.

Step 4: Check error log

With WP_DEBUG_LOG enabled, check wp-content/debug.log in File Manager. This file will contain detailed PHP error messages.

Step 5: Reinstall WordPress core

If core files are corrupted:

  1. Download fresh WordPress files
  2. Via File Manager, upload and overwrite everything except wp-config.php and the wp-content directory
  3. Clear browser cache and revisit the site

SSL Certificate Errors After Installation

Symptoms

WordPress installs successfully over HTTP, but enabling SSL causes "Your connection is not private" errors, mixed content warnings, or redirect loops.

Root Cause

SSL certificate is not properly installed, WordPress is configured with the wrong URL scheme, or force-SSL plugins conflict with server configuration.

The Fix

Step 1: Verify SSL certificate installation

In cPanel SSL/TLS Status, ensure your domain shows a valid certificate. If not:

  1. Go to SSL/TLS Status
  2. Check the box next to your domain
  3. Click Run AutoSSL

Wait a few minutes for the certificate to provision.

Step 2: Update WordPress URLs

In wp-config.php, add these lines before /* That's all, stop editing! */:

define( 'WP_HOME', 'https://yourdomain.com' );
define( 'WP_SITEURL', 'https://yourdomain.com' );

Replace yourdomain.com with your actual domain.

Step 3: Force HTTPS via .htaccess

Add this to the top of .htaccess (above WordPress rules):

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST%}/$1 [R=301,L]

Step 4: Fix mixed content

If the site loads but shows "Not Secure" warnings, run a search-replace on the database to update URLs from HTTP to HTTPS. Use the WP-CLI if available:

wp search-replace 'http://yourdomain.com' 'https://yourdomain.com' --dry-run

Remove --dry-run once you've verified the changes look correct.

Alternatively, use a plugin like Better Search Replace from the WordPress admin.

Conclusion

Most WordPress installation errors in cPanel stem from database misconfigurations, file permission issues, or resource constraints. By methodically checking credentials, permissions, and server requirements, you can diagnose and resolve these problems without starting over. Enable WordPress debugging during troubleshooting to surface hidden errors, and always verify that your hosting environment meets WordPress's minimum requirements before installation. When auto-installers fail, manual installation provides full control and often reveals the underlying issue more clearly.

FAQ

Can I install WordPress in a subdirectory via cPanel?

Yes. In Softaculous or during manual installation, specify the subdirectory in the installation path (e.g., public_html/blog). Your WordPress site will be accessible at yourdomain.com/blog.

Why does Softaculous show outdated WordPress versions?

Softaculous typically updates within days of new WordPress releases, but hosting providers can delay updates. If the latest version isn't available, install manually by downloading directly from wordpress.org.

How do I recover if I deleted the database during troubleshooting?

If you have a backup (cPanel Backups, JetBackup, or manual), restore the database from there. Without a backup, you'll need to reinstall WordPress from scratch and reconfigure it.

Should I use the cPanel username prefix for database names?

On shared hosting, cPanel automatically adds your username as a prefix for security and organization. You cannot remove this prefix, so always include it when configuring WordPress.

What if none of these fixes work?

Check your hosting provider's error logs in cPanel under Errors or Metrics → Errors. These logs often reveal server-level issues like PHP module failures or resource limits. Contact your host's support team with specific error messages from these logs.