How to fix 500 Internal Server ErrorsteemCreated with Sketch.

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.


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.


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.

{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.


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:


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/

Sort:  

Thank you for your contribution @ascending.taurus.
After analyzing your tutorial we suggest the following:

  • Your tutorial is quite short for a good tutorial. We recommend you aim for capturing at least 2-3 concepts.

  • In a tutorial it is important to have the theory about what it will explain. A tutorial is not just steps like solving something.

  • We suggest you use the tutorials template. Link.

  • Link an example of a good tutorial.

  • In a tutorial it is very important to detail very well the subject that is explaining to the reader to understand well what you are developing.

  • Your tutorial is just a solution to a problem that can be solved in several ways.

  • Permissions should already be protected only to the owner.

Please see the suggestions I made again for your tutorial and don't do the same again in the next contribution. Thank you!


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you for your review, @portugalcoin! Keep up the good work!

Coin Marketplace

STEEM 0.20
TRX 0.14
JST 0.030
BTC 68694.24
ETH 3284.21
USDT 1.00
SBD 2.77