500 Internal Server Error on localhost

5.9k views Asked by At

I'm trying to install a themeforest theme on localhost, where I have wordpress.

Once I try to create one by zip, it does 500 Internal Server Error. So I take the folder and copied within the themes folder. It works, I've activate it, with the needed plugin.

But when I try to import some content, it does the same: http://localhost/WPWebSite/wp-admin/admin.php?import=wordpress&step=1&_wpnonce=e9592e8da9 Is there some problem with localhost and connecting outside?

I follow this for debug: https://snapcreek.com/blog/wordpress-error-log-friend/ :

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);

but I can't see any log file after repeating the operation.

Also, I've set:

memory_limit = 128M

What can I also do? I can't understand where the error is...

2

There are 2 answers

0
Chin Leung On BEST ANSWER

The error you're getting is because you're trying to upload a file that exceeds the maximum of your web server.

Open your php.ini and make sure your upload_max_filesize can handle the size of your file.

Then change your Apache vhost settings to add the following directive:

FcgidMaxRequestLen 2000000

Once both has been done, restart your Apache and try importing again. :)

5
newbie On

Well i was also facing this error on one of my server and everything was fine. In last i after loads of debugging i noticed that permission was not appropriate. Make sure you don't have 777 permission PS i am assuming you are using a linux system You may also check your local server's log. If you dont know where to find logs use <?php phpinfo() ?> this will show you the path of log files. All the best