Powered by Blogger.

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 the 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 the server to install WordPress. But I met 500 Internal Server Error as the following screen.


Here post how I fix it.

Step 1, check the server log

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

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


Step 2, check files permission


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.

cd /Volumes/Disk 1/Application/XAMPP/xampfiles/htdocs/wordpress-site/


Use the following command to check all files’ permission:


ls -al


You’ll see all file's permission as the following screenshot.


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.

find ./ -type d -exec chmod 755 {} \;
find ./ -type f -exec chmod 644 {} \;

The first-line changes all directories’ permission to only writable for the owner. The second line changes all files’ permission to only writable for the owner.

Step 4: Check all changed files permission and upload to server

The updated permissions are shown as the following:


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

No comments