Knowledge Base
Known WordPress Bugs and How to Fix Them: A Complete Troubleshooting Guide
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
.htaccessfile
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:
- Go to cPanel โ File Manager โ
public_html/wp-content/ - Rename the
pluginsfolder toplugins_disabled - 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:
- In cPanel File Manager, go to
public_html/wp-content/themes/ - Rename your active theme folder (e.g.,
mythemetomytheme_disabled) - WordPress will automatically fall back to a default theme (Twenty Twenty-Four)
- 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
- Go to cPanel โ File Manager โ
public_html/ - Click Settings (top right) and enable Show Hidden Files
- Find
.htaccessand rename it to.htaccess_backup - Create a new file named
.htaccesswith 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
- Save and reload your site
- If it works, go to WordPress admin โ Settings โ Permalinks โ click Save Changes to regenerate clean rewrite rules
Step 2: Check PHP Version Compatibility
- Go to cPanel โ Select PHP Version
- Ensure you are running PHP 8.1 or 8.2 (WordPress 6.x requires PHP 7.4 minimum, but 8.1+ is recommended)
- Check that required PHP extensions are enabled:
curl,dom,exif,fileinfo,gd,imagick,intl,mbstring,openssl,xml,zip
Step 3: Check Error Logs
- Go to cPanel โ Metrics โ Errors (or Error Log)
- 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
- Go to cPanel โ phpMyAdmin
- If phpMyAdmin opens, the database server is running
- Select your WordPress database from the left sidebar
- 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
- Go to WordPress admin โ Plugins โ Installed Plugins
- Select all plugins โ Bulk Actions โ Deactivate
- Check if the problem disappears
- Reactivate plugins one at a time, testing after each activation
- When the problem returns, you have found the conflicting plugin
Method 2: Using Health Check Plugin
- Install the Health Check & Troubleshooting plugin (by WordPress.org)
- Go to Tools โ Site Health โ Troubleshooting Mode
- This disables all plugins and switches to a default theme โ but only for you. Other visitors still see the live site
- 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
- Go to cPanel โ Select PHP Version โ PHP Options
- Find
memory_limitand set it to256M - Click Save
Recommended Memory Limits
| 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.
- Go to cPanel โ File Manager โ
public_html/ - Enable Show Hidden Files in Settings
- Find the file named
.maintenance - Delete it
- 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)
- Go to cPanel โ Select PHP Version โ PHP Options
- Change
upload_max_filesizeto64M - Change
post_max_sizeto128M(must be larger than upload max) - Change
max_execution_timeto300 - 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
- Open your browser settings โ Clear browsing data
- Select Cookies and other site data
- Clear for the last hour or for your specific domain
- 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
- 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
- Limit post revisions: Add to
wp-config.php:
define('WP_POST_REVISIONS', 5);
- Clean up the database: Install WP-Optimize and run database cleanup (clear revisions, spam comments, transients)
- Disable admin dashboard widgets: Go to Screen Options (top right) and uncheck widgets you do not use (WordPress Events, Quick Draft, etc.)
- 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.
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.