ascending.taurus avatar

How to fix 500 Internal Server Error

ascending.taurus

Published: 18 Dec 2018 › Updated: 18 Dec 2018How to fix 500 Internal Server Error

How to fix 500 Internal Server Error

There may have many reasons to cause 500 Internal Server Error but today I met one which is first time for me.

A new client asked me to remove malware files from its WordPress site. I removed all malware data and upload all files to server to install WordPress. But I met 500 Internal Server Error as the following screen.

alt

Here post how I fix it.

Step 1, check server log

Check server logs to see what's reason it is. This may save you many time to find out the reason.

The following screenshot is where to check in Hosing panel in Bluehost.

alt

Step 2, check files permission

alt

From the above server log it tells us caused by files writeable by group uses. I used the following way to check files permission on Mac.

Open Terminal and use the following command to move to the wordpress site folder.

{code type=php}
cd /Volumes/Disk 1/Application/XAMPP/xampfiles/htdocs/wordpress-site/
{/code}

Use the following command to check all files' permission:

{code type=php}
ls -al
{/code}

You'll see all files permission as the following screenshot.

alt

Step 3, change permission to all files and directories

There are so many files and directories and it would be a nightmare to change ever file one by one. After learning I use the following command to do.

{code type=php}
find ./ -type d -exec chmod 755 {} ;
find ./ -type f -exec chmod 644 {} ;
{/code}

The first line change all directories' permission to only writable for owner. The second line change all files' permission to only writable for owner.

Step 4, check all changed files permission and upload to server

The updated permissions shown as the following:

alt

Upload all changes to server again and now 500 Internal Server Error fixed.


Posted from my blog with SteemPress : https://waytowp.com/how-to-fix-500-internal-server-error/

Leave How to fix 500 Internal Server Error to:

Written by

Read more #utopian-io posts


Best Posts From ascending.taurus

We have not curated any of ascending.taurus's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From ascending.taurus