Troubleshooting WordPress

Initially created as a blogging platform, WordPress evolved into one of the most popular site-building applications powering about 40% of all sites on the web.

Troubleshooting WordPress

 

 Note: If you don’t want to deal with fixing your website yourself, our WordPress Premium Support team can do that for you.

 

Initially created as a blogging platform, WordPress evolved into one of the most popular site-building applications powering about 40% of all sites on the web. Here's the list of the most common errors that can affect a WordPress site, along with an explanation of how to resolve them.

 Note: This article covers only the most common WordPress errors. If your site displays an error that is not listed below:

  • If you see a Parked domain notification instead of your site's content, this is not a WordPress issue so you should check if your domain expired and if it’s set up correctly 
  • For other errors, check the extensive list of WordPress errors on wordpress.org 

 

Select to jump to any section

Error establishing a database connection

Internal server error (error 500)

 

The site is experiencing a critical error

The site displays a white page

 

Briefly unavailable for scheduled maintenance

404 errors on posts or pages

 

Mixed content error

   

 

Error establishing a database connection

WordPress uses a database to store important data, like information about the site's users, posts, pages, and comments, for example. If your site can't communicate with the database, you'll see the Error establishing a database connection notification instead of the site's content.

This issue can appear after you move your WordPress site or, for any other reason, change your WordPress database location, username, or password. Here’s how to fix this error and get your site back online by updating the database connection strings.
Fix Error establishing a database connection in WordPress

 

Note: View Wurk Managed WordPress hosting plans

 

This article describes the troubleshooting process for the Error establishing a database connection. If you are unsure which error is causing issues on your site, check out the article about the most common WordPress errors with suggested solutions. 

To work correctly, your WordPress site must be connected to a database. WordPress uses connection strings stored in the wp-config.php file to try and make a database connection. If the connection cannot be established, you’ll see the Error establishing a database connection notification on your site. The most common method to fix this error is to update the connection strings in the wp-config.php file.

 Warning: Resolving the Error establishing a database connection requires advanced troubleshooting methods, which include connecting to your server, obtaining database credentials and prefix and editing the wp-config.php file. If you’d like a Wurk expert to fix this for you, our WordPress Premium Support team can help.

 

Required: You'll need the correct database details to complete all steps in this article. Database details are different from your WordPress login credentials and here's how to find them for different hosting plans: Managed WordPressLinux Hosting with cPanelWindows Hosting with Plesk

  1. Sign in to phpMyAdmin
  2. In phpMyAdmin, in the left menu, select the name of the database your site uses.
  3. Make note of the database prefix. The database prefix is appended to the table names (for example, if you see the following database tables: wp_3f_options, wp_3f_ posts, wp_3f_postmeta, etc., your database prefix is wp_3f_).
  4. Connect to your hosting account with a file manager
  5. Find and open the folder your WordPress site is in.
  6. In the wp-config.php file, find the section that looks similar to this example: 
     /** The name of the database for WordPress
  7. *define('DB_NAME','yourdatabasename');/** MySQL database username
  8. */define('DB_USER','yourusername'); /* MySQL database password
  9. define('DB_PASSWORD','yourpassword')/** MySQL hostname */
  10. define('DB_HOST', 'yourhostname'); $table_prefix  = 'yourtableprefix'
  11. Check if the information in this file matches the corresponding current database details you obtained earlier.
  12. If any of the information in the wp-config.php file does not match your database details, update the file with the correct information. Be careful to replace only the strings within the apostrophes since changing anything else may cause additional issues with your site. In the example above, you should replace: 
    • yourdatabasename with the correct MySQL database name.
    • yourusername with the correct MySQL username.
    • yourpassword with the correct MySQL password.
    • yourhostname with the correct MySQL host name.

 Note: If your site is hosted on Managed WordPress, the row with the host name should have the following structure: define('DB_HOST', 'yourhostname:portnumber'); You should replace yourhostname with the correct MySQL host name and portnumber with the correct port number.

    • yourtableprefix with the correct table prefix.
  1. Save the updated wp-config.php file.
  2. Verify your site is back online by visiting your site with private browsing mode in Chrome, Firefox, or Edge  

More info

  • Review the common WordPress errors at WordPress.org.
  • If you do not want to fix this error yourself, our WordPress Premium Support team can do that for you.

Internal server error (error 500)

Another issue that can affect your WordPress site is an internal server error (ISE), also known as Error 500. It's a generic server error that lets you know that the server cannot load the site.

Since it doesn't include specific information, resolving it is a matter of trial and error, which can be time-consuming. Follow these troubleshooting steps   to fix the ISE.
Fix a WordPress internal server error

 Note: This article describes the troubleshooting process for the 500 Internal Server Error. If you are unsure which error is causing issues on your site, check out the article about the most common WordPress errors with suggested solutions. 

An internal server error (ISE), also known as a 500 error, is a generic error message that appears when your WordPress site cannot be displayed. In older versions of WordPress, an ISE can also appear as a blank white page without any error details. The error can happen for a variety of reasons, but it’s usually caused by a conflict with WordPress, a plugin, a theme, or one of the site’s control files. This most commonly happens after an update.

Finding the cause of an ISE and then resolving it is often a matter of trial and error. Below are some of the ways you can find the cause of the error, with links to articles that will take you through each process and describe how to fix it.

 Note: Resolving the Internal Server Error requires advanced troubleshooting methods, which include connecting to your hosting with an FTP app, editing or disabling files, and making changes in the database. If you do not want to fix this error yourself, our WordPress Premium Support team  can do that for you.

 

Warning: Always make a backup of your site before troubleshooting or making any changes.

 

The first step in troubleshooting ISE is to connect to your server with the File Transfer Protocol (FTP). It will allow you to access and edit your site's files. When your site is experiencing a 500 ISE, your WordPress dashboard and tools like a File Manager won't work. In this case, you will need to use an FTP app to edit your site files.

There are many different FTP apps you can use, but we recommend FileZilla. Choose your hosting type from the list below to learn how to obtain FTP credentials and connect to your site:

  • Managed WordPress
  • Linux Hosting with cPanel
  • Windows Hosting with Plesk

Once connected, find a folder where your WordPress site is located–it should contain files and folders with the wp- prefix, like wp-admin, wp-content and wp-config.php. Now, you can start troubleshooting and eliminating the possible causes one by one until you find out what is causing the ISE. 

Disable your .htaccess file

One of the most common causes of an ISE is a corrupt .htaccess file. The .htaccess is a control file that WordPress uses to communicate with the server. WordPress, plugins, and themes often make changes to this file, which can sometimes corrupt the file. 

The file should be located in the main folder that contains your WordPress installation (root folder). There can be other. htacess files in different folders, but you should disable this one when troubleshooting the ISE.

The .htaccess file is hidden by default, so if you do not see the file, make sure to enable the option to show hidden files in FileZilla or any other FTP app you are using.

Once you find the file, rename it to .htaccess. disabled and then visit your site in a private browsing mode in Chrome, Firefox or Edge:

  • If the error is gone, reset your permalinks to create a new .htaccess file automatically.
  • If the error is still there, rename the file back to .htacess and continue following the recommendations from this article.

Increase your memory limits

Your hosting account assigns a set amount of its memory to running PHP, which is necessary for your WordPress site to function. Due to your site's size or the number of plugins it uses, the site may require more than the default PHP memory. 

To do this, find the wp-config.php file in the folder with your WordPress installation and follow steps 3-7 from this article to increase the WordPress memory limit. Visit your site in private browsing mode, and if increasing the WordPress memory limit did not help, try increasing the PHP memory limit to 256M or 512M. 

Disable all your plugins

WordPress plugins can cause a conflict with one another, with an active theme, or with your version of WordPress, which can lead to the ISE. This is more likely to occur after you update WordPress, the active theme, or one of your plugins. 

To check if an issue is caused by plugins, in the wp-content folder, rename the plugins folder to plugins. renamed and visit your site in a private browsing mode: 

  • If the ISE is resolved, rename the folder with plugins back to plugins and continue investigating the issue by following the steps from this article to disable individual plugins one by one to determine which one is causing the error. If you want to continue using the problematic plugin, upload. The latest version of the plugin with FTP and then enable it. This will update the plugin. If updating does not work, try the following: 
    • Search for the plugin in the WordPress plugin repository on wordpress.org. On your plugin's homepage, select View support forum. Search the forum for a solution specific to your issue. 
    • If you purchased your plugin from somewhere else, review the documentation provided by the plugin's developer. 
  • If the issue persists, rename the folder with plugins back to plugins and try the next possible solution.

Re-upload WordPress core files

 Note: If your site is on Managed WordPress hosting, skip this section because WordPress core files come preinstalled with the hosting plan. They are automatically updated to keep your site secure, and you cannot replace them with FTP. 

In some situations, your WordPress core files can be corrupted during an update, causing the ISE. Try re-uploading WordPress core files to make sure they are not causing the issue.

Download the same version of WordPress you currently use from the WordPress repository, unzip it on your local computer, and transfer (overwrite) the wp-admin and wp-includes folders from your local computer using FTP.

 Note: If you're not sure which WordPress version your site uses, you can check in the wp-version.php file found in the wp-includes folder.

Switch to a default WordPress theme

If the options above did not help fix the issue, your theme might be causing the conflict. To test, you can change to one of the default WordPress themes.  like TwentyTwenty or TwentyTwentyOne. You'll have to change the theme in the database since your WordPress dashboard will be unavailable when your site is experiencing a 500 ISE.

 Note: If you do not have a default WordPress theme installed, you can install it with FTP  and then activate it in the database.

If your site loads properly after switching to the default theme, you can update your normal theme to the latest version and activate it.

If updating the theme does not work, try the following:

  • Search for the theme in the WordPress theme repository on wordpress.org. On your theme's homepage, select View support forum. Search the forum for a solution specific to your issue. 
  • If you purchased your theme from somewhere else, review the documentation provided by the theme's developer.

More info

  • Review the common WordPress errors at WordPress.org. 
  • If you do not want to fix this error yourself, our WordPress Premium Support team. can do that for you.

 

The site is experiencing a critical error

If you see a notification that your site is experiencing a critical error, there may be an incompatibility between plugins, themes, or WordPress version that prevents the site from loading correctly. If you see a critical error on your site, follow the steps from this article to fix it.

Fix my WordPress site when it's experiencing a critical error

When a plugin or a theme is incompatible with your WordPress site, it can prevent the site from displaying content. Instead, your site displays the notification: "There has been a critical error on this website."
WordPress critical error notification
You can fix the issue from your WordPress dashboard, even if it's not loading properly, through the recovery mode feature. Follow the steps below to get your site back online.

 Note: If your WordPress site is older than version 5.2 you'll see a blank white screen instead of the critical error, and you need to investigate the issue with FTP.  The steps from this article can help only when you see the Critical Error notification.

 

Warning: You should always make a backup of your site before performing any troubleshooting.

  1. Check the inbox of your WordPress administrator email address for a message: "Your Site is Experiencing a Technical Issue." If you don't see the message, check the spam/junk folder.
    • If you do not receive the email that your site is experiencing a technical issue, and you still see the Critical Error on your WordPress site, add the suffix /wp-login.php?action=entered_recovery_mode to your domain to get to recovery mode. After that, skip to Step 3. 

Example: If your domain is coolexample.com, you should visit coolexample.com/wp-login.php?action=entered_recovery_modeto access the sign in page for recovery mode.

  1. In the email text, find the link to the WordPress recovery mode sign in page. 
  2. Enter your WordPress admin username and password and then select Log In.
  3. In the WordPress dashboard, at the top, there's a notification about what went wrong.

 Note: If you don't see the notification, deactivate all your active plugins one by one and repeat Step 5 until you find the one that caused the issue. If you still see the error with all plugins deactivated, switch to a different theme.

    • If the error is caused by a plugin, you'll see the following notification: One or more plugins failed to load properly. Then, from the left-side menu, select Plugins and deactivate the faulty plugin.
    • If the error is caused by the active theme, you'll see the following notification: One or more themes failed to load properly. In this case, from the left-side menu, select Themes and activate a different theme. 

Warning: If you change a theme while troubleshooting a critical error, it affects the way your site looks and functions, but it provides a quick fix for errors caused by a faulty theme. It can help get your site back online, but it will look different.

  1. If you're using Chrome, Firefox or Edge browser, you can enable incognito or private browsing to check if your site is working properly.
  2. If the issue is resolved, go back to the WordPress dashboard, and if you see it in the top-right corner, select Exit recovery mode.
  3. If you need to continue using a problematic plugin or theme, update it to the latest version and then enable it. If the error appears again, try the following:
    • Search for the faulty plugin or theme in the WordPress repository. On your plugin's/theme's homepage, select View support forum. Search the forum for a solution specific to your issue. 
    • If you purchased your plugin or theme from somewhere else, review the documentation provided by the developer.

More info

  • Troubleshooting WordPress
  • If you don’t want to fix this issue yourself, our WordPress Premium Support team can do that for you.

Need help? Find help in our knowledgebase or simply chat to us .

Wurk and its subsidiaries are registered services provider.