๐Ÿ“ž 24/7 Support: 03 111 404 111๐Ÿ’ฌ WhatsApp Us
๐Ÿ”’ Client Portal

Knowledge Base

Known WordPress Bugs and How to Fix Them: A Complete Troubleshooting Guide

By Pakish Support Team12 min readWordPress

The most common WordPress bugs are the White Screen of Death (WSOD), the 500 Internal Server Error, the "Error Establishing a Database Connection" message, plugin and theme conflicts, and memory exhaustion errors. Each of these has specific, well-documented fixes that do not require advanced PHP knowledge. This guide covers the 10 most frequent WordPress bugs encountered by Pakistani website owners on shared hosting, with exact step-by-step solutions you can apply through cPanel.

WordPress powers over 43% of all websites globally, and its open-source plugin ecosystem means compatibility issues are inevitable. Understanding these common bugs and their fixes saves hours of downtime and prevents unnecessary support tickets.


Bug 1: White Screen of Death (WSOD)

The White Screen of Death displays a completely blank white page with no error message. It is the most common and most frustrating WordPress bug because it gives you zero information about what went wrong.

Common Causes

  • A plugin that is incompatible with your WordPress version or PHP version
  • A theme with a fatal PHP error
  • PHP memory limit exhausted
  • Corrupted .htaccess file

How to Fix It

Step 1: Enable WordPress Debug Mode

Access your files through cPanel File Manager and edit wp-config.php. Find this line:

define('WP_DEBUG', false);

Change it to:

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

Now reload your site. The error will be logged in wp-content/debug.log. Open this file through File Manager to see the exact error message.

Step 2: Disable All Plugins

If the debug log shows a plugin error, or you cannot determine the cause:

  1. Go to cPanel โ†’ File Manager โ†’ public_html/wp-content/
  2. Rename the plugins folder to plugins_disabled
  3. Reload your site

If the site loads, the problem is a plugin. Rename plugins_disabled back to plugins, then go to WordPress admin. All plugins are now deactivated. Activate them one by one, reloading the site after each activation, until you find the culprit.

Step 3: Switch to a Default Theme

If disabling plugins does not fix the WSOD:

  1. In cPanel File Manager, go to public_html/wp-content/themes/
  2. Rename your active theme folder (e.g., mytheme to mytheme_disabled)
  3. WordPress will automatically fall back to a default theme (Twenty Twenty-Four)
  4. If the site loads, your theme has a bug โ€” contact the theme developer

Step 4: Increase PHP Memory Limit

Add this line to wp-config.php (before the /* That's all, stop editing! */ line):

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

Also check cPanel โ†’ Select PHP Version โ†’ PHP Options โ†’ increase memory_limit to 256M.


Bug 2: 500 Internal Server Error

A generic server error that means something went wrong on the server side, but the server cannot specify what. In WordPress, the three most common causes are a corrupted .htaccess file, a PHP memory limit issue, or a plugin conflict.

How to Fix It

Step 1: Reset .htaccess

  1. Go to cPanel โ†’ File Manager โ†’ public_html/
  2. Click Settings (top right) and enable Show Hidden Files
  3. Find .htaccess and rename it to .htaccess_backup
  4. Create a new file named .htaccess with this default WordPress content:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php 
</IfModule>
# END WordPress
  1. Save and reload your site
  2. If it works, go to WordPress admin โ†’ Settings โ†’ Permalinks โ†’ click Save Changes to regenerate clean rewrite rules

Step 2: Check PHP Version Compatibility

  1. Go to cPanel โ†’ Select PHP Version
  2. Ensure you are running PHP 8.1 or 8.2 (WordPress 6.x requires PHP 7.4 minimum, but 8.1+ is recommended)
  3. Check that required PHP extensions are enabled: curl, dom, exif, fileinfo, gd, imagick, intl, mbstring, openssl, xml, zip

Step 3: Check Error Logs

  1. Go to cPanel โ†’ Metrics โ†’ Errors (or Error Log)
  2. Look at the most recent entries โ€” they will show the exact file and line number causing the error

Bug 3: Error Establishing a Database Connection

This error means WordPress cannot connect to its MySQL database. Your website displays: "Error establishing a database connection".

Common Causes

  • Incorrect database credentials in wp-config.php
  • Database server is down (temporary hosting issue)
  • Corrupted database tables
  • Exceeded database connection limits (on shared hosting)

How to Fix It

Step 1: Verify Database Credentials

Open wp-config.php in cPanel File Manager and check these four values:

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

Cross-reference these with cPanel โ†’ MySQL Databases:

  • Is the database name correct (including the cPanel prefix, e.g., cpanelusername_wpdb)?
  • Is the user assigned to the database?
  • Does the password match?

Step 2: Check if the Database Server Is Running

  1. Go to cPanel โ†’ phpMyAdmin
  2. If phpMyAdmin opens, the database server is running
  3. Select your WordPress database from the left sidebar
  4. If you can see tables, the database is functional

Step 3: Repair the Database

Add this line to wp-config.php:

define('WP_ALLOW_REPAIR', true);

Then visit: https://yourdomain.com/wp-admin/maint/repair.php

Click "Repair and Optimize Database" and wait for it to complete. After repair, remove the WP_ALLOW_REPAIR line from wp-config.php (leaving it in is a security risk).

Step 4: Contact Hosting Support

If none of the above fixes work, the database server may be overloaded or experiencing issues at the hosting level. Contact Pakish support โ€” they can check the MySQL server status and connection limits for your account.


Bug 4: Plugin Conflicts

Plugin conflicts occur when two or more plugins attempt to use the same WordPress function, jQuery version, or database table. Symptoms include broken layouts, missing features, PHP warnings, and intermittent errors.

How to Diagnose Plugin Conflicts

Method 1: The Deactivation Method

  1. Go to WordPress admin โ†’ Plugins โ†’ Installed Plugins
  2. Select all plugins โ†’ Bulk Actions โ†’ Deactivate
  3. Check if the problem disappears
  4. Reactivate plugins one at a time, testing after each activation
  5. When the problem returns, you have found the conflicting plugin

Method 2: Using Health Check Plugin

  1. Install the Health Check & Troubleshooting plugin (by WordPress.org)
  2. Go to Tools โ†’ Site Health โ†’ Troubleshooting Mode
  3. This disables all plugins and switches to a default theme โ€” but only for you. Other visitors still see the live site
  4. Activate plugins one by one within Troubleshooting Mode

Common Plugin Conflict Pairs

| Plugin A | Plugin B | Conflict Symptom | |---|---|---| | WooCommerce | Elementor Pro | Checkout page JS errors, broken product galleries | | Yoast SEO | RankMath | Duplicate meta tags, canonical URL conflicts | | WP Super Cache | W3 Total Cache | Double caching, blank pages, corrupted CSS | | Contact Form 7 | WPForms | jQuery version conflict, forms not submitting | | Wordfence | Sucuri | Firewall rule conflicts, login blocks |

Rule: Never run two plugins that do the same thing (two SEO plugins, two cache plugins, two security firewalls).


Bug 5: PHP Memory Exhaustion

Error message: "Fatal error: Allowed memory size of 67108864 bytes exhausted"

This means WordPress or a plugin tried to use more memory (RAM) than your PHP configuration allows. The default limit on many shared hosting plans is 64MB, which is insufficient for WooCommerce stores or sites with many plugins.

How to Increase PHP Memory

Method 1: wp-config.php

define('WP_MEMORY_LIMIT', '256M');
define('WP_MAX_MEMORY_LIMIT', '512M'); // For admin area

Method 2: .htaccess

php_value memory_limit 256M

Method 3: cPanel PHP Settings

  1. Go to cPanel โ†’ Select PHP Version โ†’ PHP Options
  2. Find memory_limit and set it to 256M
  3. Click Save

| Site Type | Recommended Memory | Why | |---|---|---| | Simple blog (5โ€“10 plugins) | 128M | Minimal resource usage | | Business site (15โ€“20 plugins) | 256M | Standard for most sites | | WooCommerce store | 512M | Product catalog + payment processing | | WooCommerce + Page builder | 512Mโ€“1G | Heavy frontend rendering |


Bug 6: Stuck in Maintenance Mode

After a failed update, WordPress displays: "Briefly unavailable for scheduled maintenance. Check back in a minute."

How to Fix It

WordPress creates a .maintenance file in the root directory during updates. If the update fails, this file is not deleted.

  1. Go to cPanel โ†’ File Manager โ†’ public_html/
  2. Enable Show Hidden Files in Settings
  3. Find the file named .maintenance
  4. Delete it
  5. Reload your site โ€” it should be back online

After deleting the file, go to WordPress admin โ†’ Dashboard โ†’ Updates and re-run any failed updates manually.


Bug 7: Maximum Upload File Size Exceeded

WordPress shows: "The uploaded file exceeds the upload_max_filesize directive in php.ini"

How to Increase Upload Limit

Method 1: cPanel PHP Settings (Recommended)

  1. Go to cPanel โ†’ Select PHP Version โ†’ PHP Options
  2. Change upload_max_filesize to 64M
  3. Change post_max_size to 128M (must be larger than upload max)
  4. Change max_execution_time to 300
  5. Click Save

Method 2: .htaccess

php_value upload_max_filesize 64M
php_value post_max_size 128M
php_value max_execution_time 300

Bug 8: WordPress Login Redirect Loop

You type your password on the login page, hit Enter, and it redirects you back to the login page without any error. You are stuck in an infinite login loop.

How to Fix It

Step 1: Clear Browser Cookies

  1. Open your browser settings โ†’ Clear browsing data
  2. Select Cookies and other site data
  3. Clear for the last hour or for your specific domain
  4. Try logging in again

Step 2: Check wp-config.php Site URL

Ensure these lines are correct in wp-config.php:

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

The URL must include https:// (if you have SSL) and must NOT have a trailing slash.

Step 3: Rename the Plugins Folder

The login redirect loop is often caused by a security or cache plugin. Rename plugins to plugins_disabled via cPanel File Manager, then try logging in.


Bug 9: Mixed Content Warnings After SSL

After installing an SSL certificate, your site shows a padlock with a warning triangle, or some images and scripts do not load. The browser console shows: "Mixed Content: The page was loaded over HTTPS, but requested an insecure resource over HTTP"

How to Fix It

Step 1: Update WordPress URLs

In wp-config.php, ensure both URLs use https://:

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

Step 2: Force HTTPS in .htaccess

Add this before the WordPress rewrite rules:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

Step 3: Search and Replace Old URLs

Install the Better Search Replace plugin and replace all instances of http://yourdomain.com with https://yourdomain.com across all database tables.


Bug 10: Slow WordPress Admin Dashboard

The WordPress admin loads slowly (5+ seconds per page), making content management painful.

Quick Fixes

  1. Disable WordPress Heartbeat API frequency: Install the Heartbeat Control plugin and reduce admin heartbeat frequency from 15 seconds to 60 seconds, or disable it entirely on post editor pages
  2. Limit post revisions: Add to wp-config.php:
define('WP_POST_REVISIONS', 5);
  1. Clean up the database: Install WP-Optimize and run database cleanup (clear revisions, spam comments, transients)
  2. Disable admin dashboard widgets: Go to Screen Options (top right) and uncheck widgets you do not use (WordPress Events, Quick Draft, etc.)
  3. Update PHP version: Ensure you are on PHP 8.1+ โ€” PHP 8.x is up to 3x faster than PHP 7.4 for WordPress operations

Frequently Asked Questions

How do I enable WordPress debug mode without breaking website for visitors?

Set WP_DEBUG to true and WP_DEBUG_DISPLAY to false in wp-config.php. This logs all errors to wp-content/debug.log without showing anything to visitors. You can read the log file through cPanel File Manager. Remember to set WP_DEBUG back to false after you finish debugging โ€” leaving it enabled on a production site is a security risk.

My WordPress site is hacked. What should I do first?

First, change all passwords immediately โ€” WordPress admin password, cPanel password, database password, and FTP password. Then install and run the free version of Wordfence or Sucuri Security to scan for malware. Check your WordPress core files using the WordPress admin Health Check. If the infection is severe, restore from the most recent clean backup through cPanel Backup Wizard. Contact Pakish support for assistance with malware removal.

Should I update WordPress core, plugins, and themes immediately when updates are available?

For security updates (minor WordPress releases like 6.4.1 to 6.4.2), update immediately โ€” these patches fix vulnerabilities. For major updates (6.4 to 6.5), wait 3-5 days for plugin compatibility updates, and always create a full backup before updating. For premium themes and plugins, check the changelog for breaking changes before updating.

How do I fix the "Briefly unavailable for scheduled maintenance" error?

Delete the .maintenance file from your WordPress root directory (public_html) using cPanel File Manager. Enable Show Hidden Files in the File Manager settings to see this file. After deleting it, go to WordPress admin Dashboard then Updates and manually re-run any failed updates.

What PHP version should I use for WordPress in 2026?

Use PHP 8.2 or 8.3. WordPress 6.x fully supports PHP 8.2, and it provides the best performance balance of speed and compatibility. PHP 8.1 is also acceptable. Avoid PHP 7.4 it is end-of-life and no longer receives security updates. Check your current version in cPanel Select PHP Version and switch to 8.2 if possible.

How do I fix WordPress showing a blank page after editing functions.php?

This is a PHP syntax error in functions.php. Access your site through cPanel File Manager (not WordPress admin, since it is also broken). Navigate to wp-content/themes/your-theme/functions.php and look for the line you recently edited. Common syntax errors include missing semicolons, unclosed brackets, or accidental deletion of closing PHP tags. Fix the error, or restore from a backup if you are unsure what changed.

PS

About the Author

Pakish Support Team

The Pakish Support Team provides 24/7 technical assistance, hosting tutorials, and knowledge base articles to help Pakistani businesses manage their web presence with confidence.