- 1 Internal Server Error
- 2 How To Fix Syntax Error In WordPress
- 3 Error Establishing A Database Connection
- 4 WordPress White Screen of Death
- 5 WordPress Sidebar Below Content
- 6 WordPress Posts Returning 404 Error
- 7 WordPress Maintenance Mode Stuck
- 8 Connection Timed Out
- 9 Image Upload Issue In WordPress
- 10 Too Many Redirects Issue In WordPress
Internal Server Error
Perhaps the most confusing WordPress error that a beginner might encounter is “Internal Server Error”, or generally “500 Internal Server Error”. This error sometimes appears when there’s something wrong, however, the server is unable to identify where the problem is. Since the error message doesn’t indicate where you should search for the error, it is pretty much up to you to figure this out.
An internal server error can have a variety of different reasons and therefore many ways to try and solve it.
This file contains important directives for the server, such as the rewrite rules that enable the permalinks. It can be corrupted accidentally and then cause this error.
To check whether that’s the reason, access your server via FTP and find the file in your root directory.
Be aware that it’s hidden by default so you may have to enable “force show hidden files” to see it.
After you have found it, right click and rename the file to something like .htaccess_old and try reloading your website.
If that fixed the issue, all that’s left for you to do is log into your website and save your permalink structure (under Settings > Permalinks). This will generate a fresh .htaccess file.
Increase The PHP Memory Limit
Internal server errors can also be occurred by the insufficient memory. In this case, you need to extend the limit of the available memory, which happens inside wp-config.php.
To do so, open the file (again, via FTP) and add the following line:
This will extend the memory limit to 64MB or you can also set it to 128MB or 256MB if needed.
Be sure to include the line right after where it says “That’s all, stop editing! Happy blogging”. If the insufficient memory was the problem, then it is solved now.
Be aware, however, that not all hosts permit you to extend your own memory limit, in which case you have to raise them to do it for you.
Deactivate All Plugins
This WordPress error can also be the result of a plugin problem or incompatibility.
To solve this issue, the best idea is to deactivate all plugins and then reactivate them one by one until you have found the perpetrator.
If you don’t have access to the admin area, you can deactivate all plugins by renaming the plugin folder inside wp-content via FTP.
Re-Upload WordPress Core Files
Another possible reason for a server error is the core files that have been corrupted.
You can fix this by downloading the newest version of WordPress and replacing the wp-admin and wp-includes folder of your existing installation with the ones you simply downloaded. Don’t worry, It won’t make you lose any of your content but might fix your problem.
Talk To Your Host
If none of the above solve this issue then there might be something wrong with the server itself. In that case, it’s time to speak to your provider so they will fix it on their side.
How To Fix Syntax Error In WordPress
This error sometimes occurs when you are trying to add code snippets into WordPress and have accidentally missed something or the code has incorrect syntax. This will result in a PHP parse error and you will see some lines like:
Parse error- syntax error, unexpected $end in /public_html/site1/wp-content/themes/my-theme/functions.php on line 278
The error message will indicate the unexpected thing found in the code and the location of the script and the line number where the error had occurred.
Don’t worry, this message only means that there’s a mistake in your code that needs to be corrected. Browsers are real sticklers for this kind of thing and can throw a fit like this even for a missing bracket or semicolon.
To solve this issue, don’t paste code snippets into your live website. Firstly this kind of thing needs to be tested in a development environment, that’s what it’s for. However, if you already see the error above, you have to go back and correct whatever is wrong with your syntax.
Luckily, this isn’t too much of a guessing game as the browser can tell you exactly which file it has problems with and even in which line the parsing error occurs. Now all you need to do is dial into your server via FTP, browse to the file in question, right-click to edit, and find the line where the error message is mentioning. Then, either correct the syntax or delete the code in question.
After that, save and re-upload the file, then go back to your website, refresh the page and you should be all set.
Error Establishing A Database Connection
When you see the above message, the problem is clear: WordPress can’t connect with the site’s database. In case you didn’t know, the database is where WordPress saves all your content, like posts and pages and other important information.
Most times, this error is occurred by faulty credentials inside wp-config.php. However, there are other possible culprits and solutions.
This file holds all the login information for the database that you entered at installation (database name, username, password, and server).
It will be found in the root directory of your WordPress installation.
If there’s a problem with your website connecting to the database (especially if you have made any changes to the above information), check the credentials here to see if they line up.
Sometimes things go wrong with the database that needs to fix immediately.
In those cases, when you go to yoursite.com/wp-admin, you’ll see a different kind of error message stating that your database needs to be repaired.
If that’s the case, add the following line to wp-config.php to enable this feature:
After that, access http://www.yoursite.com/wp-admin/maint/repair.php to start the process. When you are done, make sure to remove the line from wp-config.php again as other people will be able to access this function otherwise.
Discuss With Your Host
If the above solutions are not working, then there might be something wrong with the MySQL server or you might have reached the maximum size of your database.
In both situations, your hosting provider needs to be the part of the solution.
WordPress White Screen of Death
This error typically results in a plain white screen with no error message. That makes it the most puzzling because you have no clue where to find and what to fix.
Increase The Memory Limit
A common reason for this problem is memory issues. Therefore, the primary step to fix that is to extend the amount of available memory.
Disable All Plugins
If a plugin is a problem, it might be necessary to disable all of them and bring them back one by one to search out which one is causing it.
Use A Default Theme
- A faulty theme can also be the problem and you’ll test this by using one of the WordPress default themes (anything with “Twenty” at the beginning of the theme name).
- If you don’t have access to the WordPress backend, you’ll also make this change via FTP.
- Go to your theme folder and rename it. This will make WordPress fall back to a default theme (which is present in the same folder).
Enable Debug Mode
If neither of the above help, then you can put WordPress into debug mode via the following line of code inside wp-config.php
Change it from false to true and update the files on your server to start the debugging. This will give warnings, errors, and notices on the page, which will help you to narrow down the exact problem.
WordPress Sidebar Below Content
This error describes the situation when your website’s sidebar is no longer next to the main content where it belongs however instead moves below it.
Seeing this can be quite disconcerting and make your query the integrity of your website and theme. However, when your layout breaks, it doesn’t necessarily mean your theme has been shot to hell. Often it can be corrected with a quick fix.
One of the most common causes of this problem is that you have too many open or closed div tags.
If you don’t know what is that then you can look these pieces of code open or close HTML elements on your website.
With too many or too few, elements close or open in the wrong place, it can completely mess up your layout.
Especially if the problem is visible only on one post or page, this is likely the perpetrator and you’ll use an HTML validator to find it.
However, the fault could also be inside your theme’s style.css, especially if you have recently made changes to it.
When the main content and sidebar assigned sizes to them then they don’t fit next to one another or too much margin or padding, and the sidebar will automatically move to the bottom of the screen.
Another possibility is that you eliminated the float property from either of them so they will no longer keep to the left or right. Firebug can assist you to spot stuff like that.
WordPress Posts Returning 404 Error
This WordPress error manifests as follows: You visit an existing single post, however, see a 404 error page instead. However, the rest of the site is fine.
Nine times out of 10, this problem is caused by faulty rewrite rules and goes away when you simply re-save your permalink structure under Settings > Permalinks.
This flushes the .htaccess file and should sometimes be enough to make the problem go away. Yet, if it doesn’t, you have to take the manual actions.
As you already know, you’ll find .htaccess in your roots directory.
Open this directory and add the following lines of code:
That should do the trick.
WordPress Maintenance Mode Stuck
While you’re running an update a screen will be shown to any visitor trying to access your website to let them know it will be back soon. That’s all good and proper, however, sometimes when there’s a problem during the update and it gets canceled or times out, the maintenance mode doesn’t go away. What’s even worse, when it gets stuck you are also locked out of the admin area, so how you will fix it?
Thankfully, the solution to this problem isn’t far.
All you need to do is access your root directory via FTP and delete the file known as .maintenance.
This is a temporary file that gets created during the update specifically to show a warning to the users.
Once it’s gone, the maintenance mode should be as well.
Be aware the file is usually hidden, so you might have to force show-hidden files inside your FTP client.
Yet, a bigger problem is that if your update script timed out, it might not have finished the update properly and disabled your website. In this case, you might have to update WordPress manually.
Connection Timed Out
If your website takes an extended time to load and finally you get a slip that it’s not available, that means your connection has timed out.
This simply happens when your website is attempting to do more than the server will handle and is particularly common in shared hosting environments with limited resources.
There are a few things you will do to solve this:
- Deactivate all plugins — Plugin issues can also cause timeouts.
- Switch to a default theme — Timed-out connections are also generally due to theme issues.
- Increase your PHP memory limit — You have to increase your PHP memory limit.
If the above steps do not work then this is the time to contact your hosting provider.
Image Upload Issue In WordPress
Images Not Uploading. This Problem with image upload in WordPress will manifest in several ways:
- Images on your website are no longer displaying
- You can’t upload media files to your website
- When the upload does go through, the image is displayed as broken.
- The complete media library is not displaying properly
Neither is a very fun situation but usually, the fix isn’t very complicated.
Image upload issues are caused due to faulty file and folder permissions that prohibit WordPress from properly accessing them.
Changes to permission levels will happen due to a mistake on the provider’s website, a faulty plugin or when your website gets hacked. Most of the time, it’s harmless but annoying. Yet, with a crafty FTP client, change the file permissions back in no time. Fire up Filezilla and find the uploads folder inside wp-content. Right-click to it and select File permissions.
Firstly set the upload directory itself and all folders contained within to permission level 744.
Then enter this number into the field at the bottom. Select “Recurse into subdirectories” then click to “Apply to directories only”.
Hit OK and the FTP client can apply the correct file permissions to your directories.
After that, we need to do an equivalent process for the files. However, this time we will select permission level 644, check to recurse into subdirectories and enable to “apply to files only”.
Click the OK button and wait until the process is complete. Now your image upload issue will be a matter of the past.
Note: If the problem persists, attempt setting the permissions for directories to 755 instead of 744.
Too Many Redirects Issue In WordPress
This error typically happens due to a misconfigured redirection issue. In WordPress, there are SEO friendly URL Structures, which uses the redirect function. Many other different well-liked WordPress plugins also use the redirect functionality as well.
Due to a misconfiguration in any of these redirection tools, your website may end up redirecting users to a URL that’s actually redirecting them back to the referring URL. In that case, the user’s browser is trapped between 2 pages causing a redirect loop.
Step 1 — Check your URL settings
- Check URL settings via Admin Dashboard
In the WordPress Admin area, click Settings. Your General Settings should appear by default. Check your WordPress Address (URL) and website Address (URL). Ensure the URL you see is correct. If your WordPress installation is located in a subfolder (for e.g., the folder is located /public_html/wp/, so the URL is www.example.com/wp)
If you made any changes, confirm to click Save Changes at the bottom of the page.
- Check/Change URL settings manually
It’s possible that you will not be able to enter the Admin area of your WordPress installation. In this case, you’ll change your URL settings with the help of your wp-config.php file. Either you can edit the file via your File Manager or by downloading, that file, edit it and upload the updated file via your FTP client. In this e.g., the file will edit via the File Manager:
- Access your File Manager, through your hosting control panel.
- locate your wp-config.php file.
- Press Edit.
- Add the following lines to the file and ensure to replace http://example.com with the URL that your WordPress should use (For example if your installation is in the root folder (/public_html/), simply use your domain name, if it’s in a subfolder (/public_html/wp) replace it with the URL to the sub-folder (http://example.com/wp). you’ll add the lines at the end after all of the code that’s already present:
- be sure to save your changes by clicking the Save icon.
- Visit your website to check whether the change of WordPress URLs fixed ERR_TOO_MANY_REDIRECTS error.
Note: don’t forget to change example.com to your real domain name.
As an alternative, you’ll also edit the URL settings via your database. You can find an excellent and simple guide on how to do that here.
Step 2 — Disabling your plugins
Another reason is that the error is caused by a corrupt/outdated plugin. It’s a good idea to disable them to regain access to your website, as well as solve the issue. On Hostinger and other WordPress hosting providers, you’ll disable all of your plugins very quickly and easily:
- Access your File Manager via your hosting control panel.
- Find your wp-content folder and access it. You will see the Plugins folder.
- Select the Plugins folder and select the Rename option. Now rename your folder to plugins_backup. Don’t worry your plugins will be safe, you will be able to rename the folder back to plugins after you’re done.
- Save changes by pressing the green Save icon.
When you rename your plugin folder then try to access your website. If the error is still not solved then the chances are that there are one or more plugins are corrupted/outdated. Try to remove some of your newer, plugins and renaming your folder back to Plugins.
You can remove plugins via your FTP/File Manager by accessing wp-content/plugins folder and deleting the folder of the Plugin you would like to remove. In the example, the WooCommerce will remove via the File Manager. Simply select the plugin you want to remove and click Delete.
Step 3 — Disabling your .htaccess file
Another possibility is that some setting in your .htaccess file is making your website go into a redirection loop. In this case, you’ll disable your .htaccess file to regain access to your website.
- Access File Manager via your hosting control panel.
- select your .htaccess file, right-click it and select Rename. If you can’t find your .htaccessfile, try looking at this guide.
- Rename your .htaccess file to anything else, for example to .htaccess1
- Access your domain, and check if your website loads.
In this case, if your website works, you’ll try checking .htaccess file’s configuration. You’ll do this by pressing Edit option. If you’re uncertain how it should look like, try using the default .htaccess configuration:
Remove all contents from .htaccess1 file and paste these rules instead. When you are done, rename .htaccess1 to .htaccess. If your WordPress website works with default rules, it simply confirms that issue was caused by incorrect .htaccess configuration.
Note: Since your website will stop working due to the changes, you should always make a backup of the original .htaccess file before making any changes to it. Also note, that if you select to replace your previous .htaccess settings, some of your permalinks, plugins, and settings might stop working.