20 WordPress common errors and how to fix them

Here are 20 common WordPress errors and their solutions:

White Screen of Death (WSOD)

Clear browser cache and cookies, increase memory limit in wp-config.php, and deactivate plugins one by one to identify the cause.

Step 1: Clear your browser cache and cookies.
Step 2: Increase the memory limit in your wp-config.php file by adding this line of code:
define( 'WP_MEMORY_LIMIT', '256M' );
Step 3: Deactivate plugins one by one to determine if a plugin is causing the issue.
Step 4: Check for any theme-related issues and switch to a default WordPress theme if necessary.

404 Error Page

Refresh the permalinks, check if the page still exists or has been deleted, and update any broken links.

Step 1: Refresh the permalinks by going to Settings > Permalinks and clicking on the ‘Save Changes’ button.
Step 2: Check if the page still exists or has been deleted, and update any broken links.
Step 3: Use a plugin like Broken Link Checker to identify and fix any broken links on your website.

Syntax Error

Check the syntax of the code and correct any mistakes.
Step 1: Check the syntax of the code in question and correct any mistakes.
Step 2: Ensure that all the code is properly formatted and indented.
Step 3: Check for any missing quotes or semicolons.

Internal Server Error

Increase memory limit in wp-config.php, deactivate plugins one by one, and check for any corrupted .htaccess file.
Step 1: Increase the memory limit in your wp-config.php file by adding this line of code:
define( 'WP_MEMORY_LIMIT', '256M' );
Step 2: Deactivate plugins one by one to determine if a plugin is causing the issue.
Step 3: Check for any corrupted .htaccess file and restore a backup if necessary.
Step 4: Contact your hosting provider for further assistance.

Connection Timed Out

Increase the PHP timeout limit in wp-config.php or contact your hosting provider for assistance.
Step 1: Increase the PHP timeout limit in your wp-config.php file by adding this line of code:
set_time_limit(300);
Step 2: Contact your hosting provider to check if there are any server-side issues.

Error Establishing a Database Connection

Check the database credentials in wp-config.php, repair the database, or contact your hosting provider.

Step 1: Check the database credentials in your wp-config.php file.
Step 2: Repair the database using phpMyAdmin or a plugin like WP-DB Manager.
Step 3: Contact your hosting provider for assistance.

Login page redirect loop

Clear browser cache and cookies, deactivate plugins one by one, and check for any incorrect WordPress address (URL) settings.

Step 1: Clear your browser cache and cookies.
Step 2: Deactivate plugins one by one to determine if a plugin is causing the issue.
Step 3: Check for any incorrect WordPress address (URL) settings in the General Settings.
Step 4: Try logging in from a different browser.

Mixed Content Error

Ensure that all elements of your website are using HTTPS by checking and updating any hardcoded HTTP URLs.

Step 1: Check for any hardcoded HTTP URLs and update them to HTTPS.
Step 2: Use a plugin like Really Simple SSL to automatically convert your website to HTTPS.
Step 3: Check for any mixed content warnings in your browser’s developer tools.

Memory Limit Exceeded

Increase the memory limit in wp-config.php, deactivate plugins, and optimize website images.
Step 1: Increase the memory limit in your wp-config.php file by adding this line of code: define( ‘WP_MEMORY_LIMIT’, ‘256M’ );
Step 2: Deactivate plugins to determine if a plugin is causing the issue.
Step 3: Optimize images on your website to reduce the memory usage.

500 Internal Server Error

Increase memory limit in wp-config.php, deactivate plugins, and check for any corrupted .htaccess file.

Step 1: Check the error logs in your cPanel or access logs in your server to identify the cause.
Step 2: Deactivate plugins one by one to determine if a plugin is causing the issue.
Step 3: Check for any corrupted .htaccess file and restore a backup if necessary.
Step 4: Contact your hosting provider for further assistance.

Email Not Sending

Check the email settings, configure SMTP, or use a plugin like WP Mail SMTP to help with email delivery.

Step 1: Check the SMTP settings in your WordPress site and ensure they are correct.
Step 2: Use a plugin like WP Mail SMTP to debug and fix email issues.
Step 3: Contact your hosting provider to check if there are any server-side issues.

Image Upload Error

Increase the maximum upload file size in wp-config.php, check for any incorrect file permissions, or use an alternate upload method.

Step 1: Check if the image format is supported by WordPress (JPG, PNG, GIF, etc.).
Step 2: Reduce the size of the image to ensure it is within the maximum upload limit.
Step 3: Check for any memory limit issues by increasing the memory limit in your wp-config.php file.
Step 4: Deactivate plugins one by one to determine if a plugin is causing the issue.

Theme Loading Slow

Step 1: Optimize images on your website to reduce the file size.
Step 2: Minimize the use of heavy plugins and eliminate any unused plugins.
Step 3: Use a caching plugin to improve the website speed.
Step 4: Use a content delivery network (CDN) to reduce the server load.

Error Establishing a Secure Connection

Step 1: Check the SSL certificate for any issues and ensure it is up-to-date.
Step 2: Use a plugin like Really Simple SSL to automatically convert your website to HTTPS.
Step 3: Contact your hosting provider for further assistance.

Error Enqueuing Scripts and Styles

Step 1: Check for any missing or incorrectly registered scripts and styles.
Step 2: Ensure that the scripts and styles are enqueued correctly in the functions.php file.
Step 3: Deactivate plugins one by one to determine if a plugin is causing the issue.

Website Not Mobile-Friendly

Step 1: Check the theme’s responsiveness and ensure it is mobile-friendly.
Step 2: Use a plugin like WP Touch to create a mobile version of your website.
Step 3: Use a responsive theme to ensure your website looks good on all devices.

Slow Dashboard Performance

Step 1: Deactivate plugins one by one to determine if a plugin is causing the issue.
Step 2: Minimize the number of widgets and screen options in the dashboard.
Step 3: Use a plugin like Heartbeat Control to reduce the frequency of the WordPress heartbeat.

If you’re unsure about how to resolve an error, it’s always best to consult the WordPress documentation or seek the help of a WordPress expert.