How to Solve 505 Internal Server Errors in WordPress

Are you tired of seeing 505 error on your WordPress? It gets quite frustrating as it’s the most common error of WordPress, and pops up on almost every screen.
If you’re looking for ways to resolve this error with ease, you’ve arrived at the right place. This article will help you give step by step instructions, which even a layman can perform, so let’s get started!

Cause of Internal Server Error

Before hopping on error solution let’s take a look at what causes this internal server error. This error is not specific to WordPress; every website running on a web server can encounter this issue.
Even though the 505 error is displayed on the screen, it doesn’t specify what’s causing that error. It is often seen that the error comes up only when you’re trying to access the administrator side, while the other areas are working fine simultaneously.

How to Fix 505 Internal Server Errors in WordPress

Plugins or theme functions are often the root cause of this error; others might include PHP memory limit or .htacessfile.
If you need to learn how to troubleshoot this error, take a look at this easy step by step tutorial.

Check for Corrupt .htaccess File

Checking for the corrupt .htaccess file should be the number one thing you should do when troubleshooting this problem.

Do the following steps:
1. Login to your site using FTP or File Manager app in your hosting account’s cPanel dashboard
2. Rename your main .htaccess file to .htaccess_old.

This .htacess file will now be located in the same directory where your other folders like wp-includes, wp-admin and wp-content are located, once you are connected.

How to Fix 505 Internal Server Errors in WordPress

After renaming the .htacess file, check if the error has been resolved by visiting your site. If it did, Congratulations!

Wait, you’re not done yet, go to Settings >> Permalinks page on WordPress admin area and click save. This save button will generate a new .htaccess file to ensure that you do not encounter a 404 error on your post pages.
If the above instruction didn’t help resolve your error, keep on reading, we have other solutions lined up for you.

Increase the PHP Memory Limit

Exhaustion of PHP memory limit can occasionally cause internal server errors. If you need to fix it watch our tutorial on how to increase PHP memory limit in WordPress. When you’re trying to log in to your WordPress admin account or if you’re trying to upload an image in wp-admin, and then you see this error, you should follow these instructions to increase the memory limit.

1. Make a blank text file and name it php.ini
2. Now copy and paste the following code into your php.ini file
Memory=64MB
3. Save the php.ini file
4. Using FTP, upload the file in your /wp-admin/ folder

If above instructions have helped you in fixing your problem then Bravo! But this is a temporary solution, if you still need to see what is exhausting your memory limit, we strongly suggest that you ask the Word Press web hosting company to find the exact diagnostics by looking in the server log, as this could be because of a poorly coded theme or plugin function.

If these guidelines did not help you in resolving your issue, then you need to do some more troubleshooting.

Steps

If checking for corrupt .htaccess file and increasing the PHP memory limit didn’t solve the error, it means that there is a specific plugin or combinations of plugins which are causing the problem. For this, you need to deactivate all WordPress plugins at once.

Deactivate all WordPress plugins at once

Then you need to perform the following steps:
1. Go to the WordPress admin area
2. Click on Plugins.
3. Reactivate one plugin at a time until you find the faulty plugin
4. Get rid of that plugin
5. Report the error to the plugin author.

Re-upload Core Files

If all of the above options are failing, then it’s time to re-upload wp-admin and wp-includes folder from a fresh WordPress install.

This issue would resolve if there was a corrupted file present, but don’t worry it would NOT delete any prior information.

Follow these steps to re-upload your core files:
1. Visit the WordPress.org website
2. Click on the Download button.(it will install zip file on your computer)

WordPress Core Files Re-upload

3. Extract the zip file
4. Find a WordPress folder inside the zip file
5. Connect to your WordPress website using an FTP client.
6. Go to the root folder of your website. It contains wp-admin, wp-includes, wp-content folders.
7. In the left column open the WordPress folder on your computer.
8. Select wp-includes and wp-admin folders
9. Press right-click and select ‘Upload’.

WordPress Core Files Re-upload

This will cause your FTP client to transfer those folders on your server. It will then ask you whether you would like to overwrite the files.

10. Select ‘Overwrite’
11. Select ‘Always use this action’

WordPress overwrite files

The FTP client will now replace your older WordPress files with the new files. This solution helps when the WordPress files were internally corrupted.

Ask your Hosting Provider

If nothing else works, this is the last solution for you. You need to contact your web hosting support team and they will be able to check the server logs and locate the root cause of the error.

We sincerely hope that we helped you in fixing the internal server error in your WordPress.


Software Engineer | Ethical Hacker & Cybersecurity...

Md Obydullah is a software engineer and full stack developer specialist at Laravel, Django, Vue.js, Node.js, Android, Linux Server, and Ethichal Hacking.