The most common issues of your WordPress site not running

Imagine, you are in a good mood, ready to start your working day and make some changes to your website. You grab a coffee, open your website or administration panel and you see *****! Error, a white screen or anything that just makes you go mad, because your website is not working! What should you do?

In this article, we have summarised the most common issues as to why your site is not working. Here they are:

  • Error while establishing a database connection
  • White screen
  • Internal server error
  • Login page redirect or refresh issue
  • Single post 404 error

Error while establishing a database connection

The reason for this error is simple. WordPress can’t connect to the database. It usually means that there are some problems with the server or that something has happened with the database login information. What you can do is to check whether this problem exists at the front-end (when you enter the domain name) and back-end (when you enter the name of the access to the administration panel).

If the error is the same in both places, you should check the file ‘wp-config.php’. It is one of the most important files among all those that run your site. There you should check four parameters – ‘DB_NAME’, ‘DB_USER’, ‘‘DB_PASSWORD’ and ‘DB_HOST’.

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'database_name_here');

/** MySQL database username */
define('DB_USER', 'username_here');

/** MySQL database password */
define('DB_PASSWORD', 'password_here');

/** MySQL hostname */
define('DB_HOST', 'localhost');

Please note that your host might not always be ‘localhost’, but could be the name of the host. You can find out this name by contacting your server provider. If the information is correct in the file ‘wp-config.php’, most likely something is wrong with the server.

However, if you get different messages at the front-end and back-end, then most likely something is wrong with the database and you should make corrections there. Open ‘wp-config.php’ file through ‘phpMyAdmin’ and enter the code line “define(‘WP_ALLOW_REPAIR’, true);” before the line “That’s all, stop editing! Happy blogging”.

/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*/
define('WP_DEBUG', false);
*/
define('WP_ALLOW_REPAIR', true);

/* That's all, stop editing! Happy blogging. */

Afterwards, type the address http://www.yoursite.com/wp-admin/maint/repair.php into the explorer. If there is a problem with the database, WordPress will offer to fix it for you. If nothing happens, most likely you should contact your server provider.

White screen

This is the most annoying error because it is not possible to get inside the administration panel. Basically, there could be three reasons for this.

  1. The memory limit has been exceeded – you should make corrections to it by opening ‘wp-config.php’ file through ‘phpMyAdmin’ and putting the code line “define(‘WP_MEMORY_LIMIT’, ‘256M’);” before the line “That’s all, stop editing! Happy blogging”. It means that the PHP memory limit is going to be increased to 256MB (otherwise it is 64MB by default).
    /**
    * For developers: WordPress debugging mode.
    *
    * Change this to true to enable the display of notices during development.
    * It is strongly recommended that plugin and theme developers use WP_DEBUG
    * in their development environments.
    */
    define('WP_DEBUG', false);
    */
    define('WP_MEMORY_LIMIT', '256M');
    
    /* That's all, stop editing! Happy blogging. */
    

    If this doesn’t solve the white screen problem or you had bigger memory than 64MB by default, then the most likely problem could be with the theme or plugin;

  2. Problem with the plugin – you should deactivate all plugins to detect whether this helps. Ordinarily, this would seem to be an easy task, but it’s not, because of the white screen. You simply cannot access the administration panel. You should use ‘phpMyadmin’ again. Choose the WordPress database and you will see all the content there. You should choose the ‘wp_options’ table. There you will find all the options that are associated with your WordPress site, so you should find the one responsible for plugins namely ‘active_plugins’. Click on ‘Edit’ and find the field ‘option_value’ (row name) and ‘Function’ (column name). There you should write ‘a:0:{}’. Click ‘Go’ and save all changes. Check if you are able to login to the administration panel.
    If you are able to access the administration panel, next you should activate all plugins one-by-one to detect which one is responsible for the white screen. The reason why some plugins may interrupt the smooth work of the theme is most likely related to compatibility issues, therefore you should contact the developer of the plugin. Another option is to check the ‘Plugin’ section on the left side of the menu, open it and see whether the plugin that caused the problem is indicated as “Needs an update”. If yes, then update it and the problem should be solved. Another option is to choose a different plugin.
  3. If you are still not able to access the administration panel of your site, the first thing to do is to reactivate all plugins. Do it in the same manner as you deactivated them by deleting the value in the field ‘a:0:{}’ and save the changes. You should keep searching for the right reason for the problem because plugins do not create it. There is one option left.
    Problem with the theme – to find out whether a problem with the theme exists, you should deactivate it and activate default ‘Twenty Ten’ theme instead. However, before doing that; backup your current theme folder. Here is the explanation on how to do backups. When your current theme is safe, delete it and you will have the default theme active. If you can now access the administration panel of your site now, then you have problems with the theme. And these problems most likely exist in the file ‘functions.php’. If you do not have the appropriate skills to detect a problem, you should contact somebody who can help you. Another option is to contact the developers of the theme, describe the problem and try to find a solution with their help. Usually, author of the theme has created a support forum where you can also find additional information. Probably some users have experienced the same issues and some solutions have already been described that you can use yourself.

Internal server error

This error is one of the most common errors. The worst thing about this notification is that it doesn’t give any clues about where to look for the solution. But there is always one – you should just start looking for it.

Internal Server Error

The first thing to do is to check the ‘.htaccess’ file. You will need to use Filezilla – an open source program that is a free FTP access solution. There you will see all files associated with your WordPress website. You should look for the ‘.htaccess’ file in the same directory where all folders are (wp-content, wp-admin, wp-includes etc.). Rename this file by adding ‘old’ or something similar to the title. Then reload your website and check whether this helped. If you solved the issue, then go to the WordPress administration panel, choose ‘Settings’ on the left side menu, find ‘Permalink’ in the sub menu and just hit the ‘Save’ button. It will save your successful solution to dealing with this error.

If you still have an error on the screen, keep searching for the problem. Please pay attention to the problems described above – memory limit, plugin errors – because they can also turn on the internal server error.

If none of this helps, you can try to download a fresh WordPress version from the official WordPress website. You will get it as .zip folder. Store it on your computer, unzip and replace two folders – ‘wp-admin’ and ‘wp-includes’ with the ones you have while opening the site’s back-end with Filezilla.

WordPress files from the zip downloaded from WordPress.org

Open the web page via the browser. If you still have same old internal server error, contact your service provider.

Login page redirect or refresh issue

This is an issue you experience when you can’t access the administration panel of the website. When you try to enter your username and password, you’re redirected to the same login page over and over again. The first thing to do is to make sure that the username and login you are trying to use are correct.

Your browser is collecting all kinds of data while you are using it. Sometimes corruption of data may occur, in which case the solution is to clear the cache and all browsing history. Find the ‘History’ button in your browser’s ‘Settings’ and click ‘Clear browsing data’. Close the browser window and try to open it again. This could solve the issue.

If this doesn’t help, go back to the issues described above. Most likely you will have to deactivate all plugins, put on the default theme or delete the ‘.htaccess’ file. If none of this works, try to define the URL. You can do it by logging into your site’s administration via Filezilla and find the file ‘wp-config.php’. Add these two lines – ‘define(‘WP_HOME’,’http://yourwebsite.com’);’ and ‘define(‘WP_SITEURL’,’http://yourwebsite.com’);’ – of the code before the line “That’s all, stop editing! Happy blogging”. Put your real site name instead of ‘yourwebsite’.

/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*/
define('WP_DEBUG', false);
*/
define('WP_MEMORY_LIMIT', '256M');
*/
define('WP_HOME', 'http://example.com');
*/
define('WP_SITEURL', 'http://example.com');
/* That's all, stop editing! Happy blogging. */

Single post returning 404 error

This problem appears while trying to open a post. It means that there are no problems with accessing the main page or administration panel. A 404 error is usually caused by the fact that there are problems with the ‘.htaccess’ file. In this case, what you should do is go to the administration panel, on the left-hand side menu choose ‘Settings’ and ‘Permalinks’ and just press the ‘Save changes’ button.
If this doesn’t help, access the FTP server by using ‘Filezilla’, choose the ‘.htaccess’, right click of the mouse and you will get to the ‘Permissions’ option. Overwrite the existing permission setting with ‘660’ and save it. Afterwards, repeat the actions described in the paragraph above. If this solves the issue, change permission of the ‘.htaccess’ file back to ‘666’.

Still your WordPress site not running?

We haven’t solved all your problems, but we really hope that we have made your life easier. Do not hesitate to share your experience if you have solved something differently. In addition, let us know what other errors you’ve experienced and how you solved them. Need an advice? Jump into the comments section below.