A Quick Guide For Fixing 500 Internal Server Error In WordPress.

FIX-500-INTERNAL-SERVER-ERROR-IN-WORDPRESS.jpg

Web Development

Jan 18, 2019

A Quick Guide For Fixing 500 Internal Server Error In WordPress.

This Internal Server Error screen surely panics every WordPress user as there is no definite origin for this error. This error may be considered as one of the most frustrating errors that any WordPress developer goes through.

No more worries!!!

The tragic Internal Server is Fixable.


We will be discussing the solution to every reason for this error occurrence very precisely.

Let's get started.

We highly suggest backing up your WordPress site as in no case you would ever want to miss your data. It's better to be safe.

 

What causes 500 Internal Server Error in WordPress?

There are three main causes responsible for this 500 Internal Server error:

  1. Corrupted .htaccess file.
  2. Problematic plug-ins.
  3. PHP memory limit issues.

 

What could be done to resolve the 500 Internal Server error?

1. Fixing .htaccess File Error.

 

i) Log in to your FTP account.

ii) Look for .htaccess file available in the root directory along with other folders such as:

       - wp-content

       - wp-include

       - wp-admin

iii) Download .htaaccess file from the live server to a local location on your system.

iv) Open this file in any code editor on your PC.

v) Copy-paste the below code:

For WordPress version till 3.4-

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
# END WordPress

For version 3.5 and above-

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

 

2. Fixing Faulty Plug-ins.

i) Login to your C-panel.

ii) Go to File Manager and go ahead to public-html and then to wp-content.

iii) Go to folder "PLUGINS."

iv) Right click on the folder and select "rename."

v) Rename the folder with any name which you can quickly memorize.

        For e.g.- plugin_faulty 

This will deactivate all the plugins for once.

vi)Reload your WordPress website.

If this Fixed your WordPress website's error, then the problem was caused because of a faulty plugin. Hence the culprit is detected successfully.

vii) Rename plugin_faulty to plugins.

vii) Log in to the WordPress admin dashboard.

viii) Start activating your plugins one by one and correspondingly refresh your WordPress website with each plugin's activation until you detect the error again.

ix) When you detect the error again, that means the last plugin which you activated was responsible for the error.

x) Eliminate this plug-in, and now you are ready to go with your Wordpress website successfully.

If you still haven't fixed the error, then hold on we have more solutions.

 

3. Increasing PHP Memory Limit Issue.

For increasing PHP memory limit, you will have to alter the code for one of the following file:

     -Functions.php File

     -wp-Config.php File

     -.htaccess File

     -PHP.ini File

i) login to C-panel.

ii) Select File Manager and go to your root folder typically named as public_html.

For the following three files procedure remains the same:

                                          a)Functions.php File

                                          b)wp-Config.php File

                                          c).htaccess File

iii) Right click on the file and select download.

iv) Open the downloaded file in any code editor and add the code given below under the opening o PHP tag.

 

functions.php File:

@ini_set(‘upload_max_size’ , ’62M’);
@ini_set(‘post_max_size’, ’62M’);
@ini_set(‘max_execution_time’, ‘290’);

WP-Config.php File:

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

.htaccess File:

php_value upload_max_filesize 62M
php_value post_max_size 62M

v) For PHP.ini File

         a) Click on wp-admin folder.

         b) Create a file in that folder with the name php.ini

         c) Paste the below code in the php.ini file.

memory_limit = 62M
upload_max_filesize = 62M
post_max_size = 62M
file_uploads = On

We hope that now you have successfully fixed this 500 internal server error from your WordPress website. We at Baymediasoft-web development company keep providing all the solutions to your queries through our blogs. If you are a WordPress website developer, we hope you will find it fruitful. For more queries, you may contact us we will get in touch with you shortly.

If you want to hire our expertise Wordpress website developer for your projects, you may step towards our highly-experienced WordPress developers who have keen technical knowledge. Our professional developers have years of knowledge in all the web development fields including PHP Development, WordPress Development, Cake PHP, Joomla, and Laravel Development. We make sure you won't regret contacting our development team.

Author
Capture.JPG
Kathy Johnson

Super Blogger

Be the first to comment!

Leave a comment

recent blogs

Checkout more of our Creative Writings

WordPress The Safest Platform For Entrep...

WordPress Is Self-possessed For Expected Growth As...

J

  • James Smith
  • |
  • 1 month ago
Wordpress Development Services

Creating Your Websites In WordPress Does Not Let Y...

J

  • James Smith
  • |
  • 1 month ago
Blockchain Technology

Blockchain Technology Is Winning Trust With Time....

S

  • Sheron Kelly
  • |
  • 1 month ago
Best WordPress Plugins For Performance O...

WordPress As A Stage Offers A Lot Of Choices For E...

J

  • James Smith
  • |
  • 4 months ago
Quick Steps To Add Header And Footer Cod...

Here We Will Be Discussing Two Methods By Which Yo...

J

  • James Smith
  • |
  • 4 months ago
A Quick Guide For Fixing 500 Internal Se...

This Internal Server Error Screen Surely Panics Ev...

K

  • Kathy Johnson
  • |
  • 5 months ago

clients

head quarter

development center

ping us!

let's get connected