Last updated on September 30, 2018 by J M Mubasshir Rahman

How to Fix the 500 Internal Server Error in WordPress

fix-internal-server-error-wordpress

Maybe the most confusing WordPress error that an amature may run over is “Internal Server Error”, or now and then “500 Internal Server Error”.

This error generally shows up when there is something incorrectly in the server inside, but the server can’t distinguish where the issue is. Since the error message does not demonstrate where you should search for the error, it is basically up to you to make sense of this.

Why Internal Server Error in causes WordPress?

Internal server error isn’t particular to WordPress. It can occur with any site running on a web server. Because of the non specific nature of this error, it doesn’t provide any clue to the developer or server administrator.

Requesting that how fix an internal server error resembles requesting that you are in hospital for treatment of your illness, but you don’t know where is your illness.

internalservererror

Internal server error in WordPress is often occurs by plugin or theme functions. Other possible reasons of internal server error in WordPress that we know of are: corrupted .htaccess file and PHP memory limit.

We have also seen a lot of people claiming they got internal server error only showing up when they are trying to access the admin area of WordPress while the rest of the site works fine.

Now, Let’s wrap up this thing and let’s troubleshoot the internal server error to see what is the possible reasons and the possible fixes.

    1. How to Fix 500 Internal Server Error on WordPress Website
    2. Create a WordPress Backup
    3. The .htaccess File Error Fix
    4. Increase PHP Memory Limit
    5. Theme/Plugins Audit
    6. New wp-admin and wp-content
    7. Hosting Provider

Create a WordPress Backup

You can backup in three ways. Such as:

  • Via Cpanel
  • Via SFTP
  • Via Third-Party Plugin

Via Cpanel

This is so easy you can do it in the time it takes to brew a mug of coffee. Here’s the procedure:

  • Login to your web host and navigate to cPanel. For most web hosts, the cPanel is usually the first page you encounter when you login
  • Navigate to the File Manager, which should lead you to your public_html or Home directory
  • From here, just locate your WordPress directory. This is the folder you want to backup
  • Unfortunately, you can’t download the WordPress folder in File Manager without first compressing it. Worry not though, compressing a folder needn’t be challenging
  • Click on your WordPress directory, and select Compress from the menu bar. Alternatively, right-click on the folder and choose Compress from the drop-down options menu that appears
  • Choose the compression type e.g. ZIP, Tar, GZIP etc from the dialog box that opens. I always go with a ZIP archive
  • Then just hit the Compress File(s) button and wait for the process to run its course. Your server will save your compressed WordPress folder
  • Click on the archive you just created and choose Download from the menu. Alternatively, right-click on the archive and choose Download.
  • Choose a secure location on your hard disk and save your backup
  • And that’s it!

Tip: Upload the backup to your Dropbox account, Google Drive, burn it to a DVD/CD, email it etc – just make sure you have several copies to ensure you don’t lose your site should one of the backup die

Via SFTP

We suggest utilizing a famous file manager, for example, FileZilla or Transmit on the grounds that they’re lightweight and simple to utilize. First you’ll have to install the application on your PC and use your SFTP login credentials from your web hosting account.

transmit sftp login

Now, sign in to the file manager of your decision (we’re utilizing Transmit in this example) and enter the details of your site including username, your site url, your sftp password, and change the port number to 2222.

copy-files-sftp

Once you’ve signed in your sftp, you should see the files of your WordPress site. Essentially select all files, click right button of mouse and select the options to “Download Selected Items.” Once downloaded, ensure the records are compressed up and give the file a significant name, for example, the present date.

Via Third-Party Plugin

There is a lot of Plugins available on the internet. Such as:

  • Back up buddy
  • Duplicator
  • BackWPup

and so on.

The .htaccess File Error Fix

The main thing you ought to do while investigating the internal server error in WordPress is check for the .htaccess file.

You can do as such by renaming your principle .htaccess fileto something like .htaccess_old. To rename the .htaccess file, you should login to your site utilizing FTP or File Manager application in your hosting cPanel dashboard.

When you associated, the .htaccess file will be situated in a similar directory where you will see folders like wp-content, wp-admin, and wp-includes.

edit-htaccess-file

When you have renamed the .htaccess file, try to visiting your site to check whether this solved the issue. In the event that it did, at that point give yourself a gesture of congratulations since you fixed the internal server error.

Before you proceed onward with different things, ensure that you go to Settings » Permalinks page in WordPress administrator zone and tap the spare catch without rolling out any changes. This will create another .htaccess file for you with appropriate rewrite rules to guarantee that your post pages don’t return a 404 error.

On the off chance that checking for the .htaccess file arrangement did not work for you, at that point you have to keep perusing this article.

Increasing PHP Memory Limit in WordPress

When a client makes a demand it is dealt with by PHP and triggers a procedure which eventually renders the HTML at client end. PHP memory is allocated to run this procedure. Another method for settling the 500 internal server error is by expanding the PHP Memory Limit. Your host and WordPress set the PHP memory limits by default. When you watch a memory drop, the server consequently shows a 500 internal server error. To stay away from such disparity, just increase the PHP memory limit in WordPress and check whether your site works fine or not.

Probably the most widely recognized methods for increasing a WordPress site’s PHP memory limits is by adjusting the code in one of these files:

  • Functions.php File
  • .htaccess File
  • PHP.ini File
  • wp-Config.php File

Functions.php File

  • Login to your Cpanel or FTP.
  • Navigate like this: wp-content>themes>yourtheme>functions.php
  • Add these code at the very bottom of your functions.php:

@ini_set(‘upload_max_size’ , ’64M’);
@ini_set(‘post_max_size’, ’64M’);
@ini_set(‘max_execution_time’, ‘300’);

After this try to visit your website if that is fixed by 500 interval error otherwise continue to other methods which is already described in this post.

.htaccess File

  • Navigate to .htaccess and add those following lines of code in that.

php_value upload_max_filesize 64M
php_value post_max_size 64M

After this try to visit your website if that is fixed by 500 interval error otherwise continue to other methods which is already described in this post.

PHP.ini File

If you don’t have any php.ini  file in your file manager then create one through your cpanel or ftp. Then add these lines in your php.ini:

memory_limit = 64M
upload_max_filesize = 64M
post_max_size = 64M
file_uploads = On

After this try to visit your website if that is fixed by 500 interval error otherwise continue to other methods which is already described in this post.

WP-Config File

Open Wp-Config.php file. Under the wp_debug paste those line:

define(‘WP_MEMORY_LIMIT’, ’64M’);
ini_set(‘post_max_size’, ’64M’);
ini_set(‘upload_max_filesize’, ’64M’);

Check your site if the problem is fixed otherwise pursue to the next method.

Theme/Plugins Audit

Corrupted or outdated themes/plugins can cause issues which leads to errors in WordPress website. They are considered as a security risk as if not updated with latest WordPress security patches.

  • At first update wordpress core
  • Activate a default theme (E.G. Twenty Twelve) then check the site if it is fixed.
  • If it doesn’t fix then navigate to the plugins
  • Select all and deactivate all plugins then check the site if it s fixed or not.

New wp-admin & wp-includes

If the plugin/theme deactivation doesn’t fix the internal server error, at that point it is worth re-install the wp-admin and wp-includes folder from a fresh WordPress install

This won’t corrupt any of your data, however it might solve the issue on the off chance that any file was corrupted or removed.

  • First you will need to visit the WordPress.org website and click on the Download button.
  • Connect your site using cpanel or ftp
  • Uplaod “wp-admin” and “wp-includes” folder

Ask your Hosting Provider

If all techniques failed to fix internal server error on your website, then it is time to get some more help. Contact your web hosting support and they will be able to check the server logs and locate the main reason of the error.

 

Concluding Thoughts

We hope you discovered this guide accommodating and that you could solve your “WordPress 500 internal server error” issue. Have you made any other method to dispose of this issue? It would be ideal if you share your answers with us in the gave comment area beneath. I am certain, it will be useful for other people, who are confronting this issues.

Keep Learning