Wordpress Blog :: 500 Internal Server Error - wordpress

I am getting this error message while trying to access a wordpress blog which is installed in a directory. Is this due to .htaccess or something? Any help is appreciated.
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster#xxxxx.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache Server at xxxx.com Port 80'

This is almost always a problem with your Apache configuration. Errors originating in PHP won’t trigger the Apache 5xx handler, which is what you’re seeing.
Unfortunately, without more information, your problem is impossible to diagnose. I’d recommend that you:
Check the logs. First thing! It should give you a better idea where your problem is.
Stop and restart Apache. If there is a problem with permissions on something Apache needs write access to (logs), it could completely fail to start. This should give you the proper motivation to fix the problem, particularly if there are other VirtualHosts on that Apache.
Move your .htaccess file(s) somewhere else. If Apache works, you know it’s a problem with that file.

It sounds like you're getting some sort of PHP error but PHP isn't set to display errors. You'll want to check your Apache logs for detailed error info.
The mostly likely culprit is that you're missing some prerequisite for running WordPress, although all you should really need is Apache, MySQL, & mod_rewrite.

I was able to fix it by adding the following line to my .htaccess file:
php_value memory_limit 128M
Russ

This is happening to me RIGHT NOW.
As to from what I know, my hosting providers did a DNS change and so I'm waiting for the DNS to propagate, it's been like three hours and still zero.
Blog is showing ok, apache is up and working, I just can't get access into the WP Admin area.
If it does get fixed by tomorrow, I'll reply here so it can be of help for others.
Edit: I just fixed my problem.
In my case it was determined that the Fast Contact Form plug-in was creating the problem. I modified the folder name from si-contact-form to si-contact-form-hold then I regained WP Admin access.
After that I created a php.ini file with this string inside 'memory=64MB' and saved that into the wp-admin folder.
Manually deleted the si-contact-form-hold (to avoid possible corrupted files) and reinstalled the Fast Contact Form.
All my settings were already there and everything is back up and running good!
Hope this helps.

Look at http://zemalf.com/1470/wordpress-htaccess-the-definite-guide/, and look for the paragraph which says something like "Good and default .htaccess looks like this...."

My issue was a little bit different. I had an .htaccess file inside the wp-admin directory. I deleted the .htaccess inside of wp-admin and that fixed my problems.

Unfortunately it could be anything. Do static pages on the site work properly.
Have you checked the server logs.
I think it is likely to do with php. If static pages are there then possibly your config for wordpress is incorrectly configured or files missing.
Has php be working? Did the blog work and then stop? Did you get through the install process?

Check wordpress files ownership for the user are correct or not.
In linux ls -laZ command will display the ownership.
For setting the ownership for a folder use this command
chown -R username:username /user/username/public_html/

An HTTP 500 error could be caused by a great many things. Have you changed your .htaccess file recently? If you try to use a .htaccess feature that is disabled on your host, that is one possible cause.

Some more points
Blog has been running successfully. Just observed this problem since yesterday.
Blog is in a directory so it works something like this www.xyz.com/blog. Apparently www.xyz.com is working perfectly.
Update on logs
Getting these two errors in the logs:
File does not exist: /home/directory/public_html/500.shtml
/home/sub-directory/public_html/sub-directory/.htaccess: RewriteCond: bad argument line '%{REQUEST_FILENAME}!-f'
/home/directory/public_html/sub-directory/.htaccess: # without matching # section
How do I restart apache on cpanel ?

memory = 64MB;
The above line inside a php.ini file uploaded to the wp-admin folder solved my problem. I was not being able to log into the dashboard either through /wp-admin or /wp-login.php, and was getting a HTTP server error 500.

There can be multiple causes for this, I just solved mine, after 2-3 hours of going crazy.
I had another WP instance in a subdirectory inside the main WP instance (in the root folder).
Have checked / deleted .htaccess
deleted plugin folder
In the end, it was to do with the permission of the subfolder in which second instance was running. It was originally 775 (write permission for group), I had to change it to 755 (no write permission for group) and this finally fixed it, like magic.
This is of course just one of possible the answers to your question, I wanted to write it down though as I didn't find it explicitly written anywhere so it might save others some time.

Related

WordPress internal Server Error 500 when moving hosts

I am trying to move my WordPress site from one hosting service to another. I made a backup and restored it on the new host. But I am getting internal server 500 error on the site. I have tried to fix the .htaccess file but its still giving error.
The issue is, if I try to rename it to test it, its not giving the internal 500 error but redirecting me to WordPress installation page called wp-admin/install.php
Can someone help me for solve the issue.Thanks
All the suggestions that are given are great, but if those do not work, then you can try to downgrade PHP. It had worked in my case when I was facing the same error.
You can dig in the error log and find what exactly is causing the error.
Steps for debug.
As previously said: stop all plugins and try again. If problem still exists check logs again. Then switch to default theme and so on.
Btw have moved the DB properly? With the same connection settings.
I think you should check your wp-config.php and PHP version. make sure you have entered correct DB info in wp-config like db_name, password, and table_prefix etc...
if You have changed hosting, probable You need to check database and .htacess file. If You are getting installation page means its database issue, Please check database prefix in wp-config.php file and it will solve your issue.
there are lot of causes for internal server error. The main reasons for internal server errors are.
Corrupt .htaccess file
PHP Memory limit
Faulty code in Theme
Corrupted plugin
Corrupted core files
Incompatible PHP version
In oder to fix this issue, you need to investigate in step by step order.
To solve this issue first of all you need to enable Debug mode and check the issue.
after that try with restoring .htacess file, enabling default theme, disabling plugins etc.
if you still facing 500 internal server issue, follow tutorial on WPERA to fix 500 internal server error. Hope this helps.

Symfony instance fails to see directories as writable

I've been filtering through google to try to find an answer to this, but I still can't find one that fixes my issue. I have migrated a website to a new server. The framework is Symfony 2.8 on php5.6 using Nginx and PHP-FPM.
Here is a screenshot of the config.php page.
To resolve this, i've tried...
Changing the user for Nginx and php-fpm to both the user I log in with and Nginx, both didn't work
I've opened up the privileges on the cache and log folder to 777 within the app folder, and that didn't work, nope.
I've tried assigning the cache and logs folder to nginx:nginx, no go.
I've manually assigned app.php, app_dev.php, and the console file to have the umask(0000) and umask(0002), nope.
Restarted the Nginx service and php-fpm service after each change, nodda.
I've restarted the entire server thinking something might be stuck, but you guessed it. No!
That leaves me here. I've gone through everything that I can think of and it baffles me that Symfony still won't recognize the directory as writable. It seems like the most simple thing, but... nope.
Anything will help, please pass anything along.
After countless hours of research and scraping the internet for details, I have found the answer! I'm posting it here in case someone else is having the same issue... and hopefully I can save them some time. This took up two days of my life that i'll never get back.
For whatever reason, SELinux was causing this error. I came across this issue on superuser stack exchange, and it told me to temporarily disable SELinux to test. After running sudo setenforce 0 everything came back up. I then completely disabled it and everything has been working fine since.
This happened suddenly and i'm still unsure of the reason. The site worked for about a week before this was triggered.
You should read this to setup you directories permissions http://symfony.com/doc/current/setup/file_permissions.html
I always go for the point 3. with Debian/Apache, Unfortunately i never tried it with nginx.

HTTP 500 Error Displaying MAMP

I am trying to test my website locally using MAMP, however I am receiving a 500 Internal Server Error error whenever I enter localhost into my browser. Any idea why this may be happening? I have not tried anything so far to mitigate the issue as I do not know where to start. Excuse me if the question is slightly vague.
Thanks,
James.
The easiest way to get an internal error is by editing .htaccess or .conf files. If you've made any edits to those files recently, comment them out or revert to the original versions (MAMP bundles original .conf files in an "originals" folder with the live .conf files, so you can copy and paste those back in if something goes wrong). If that resolves your error, slowly add your changes back in until it breaks again, and you'll know where you went wrong.

Random 500 internal errors on my wordpress website

I have around 10 plugins installed.
I use a wordpress theme by sitemile.
The site works fine sometimes, but very often, if I were to go to the login or sign up page, it displays the 500 internal error. I want to set up logs for see to see whats happening but I am not sure how I can do that.
Also, sometimes the homepage of the website loads very funky but if i go to other pages, it may or may not load that page properly.
Not an internet issue. Cleared cache as well. Interestingly, I see different results in normal and incognitu browsers.
Do these internal errors occur most of the time when you have a lot of plugins? Is there some other source of problem that I can check to make sure everything in my site is alright?
Error screenshot attached.
Homepage of website
Depending on your webhost, you might already have more details in a log file. Often times with apache it's called "error_log" and it can be found in your root directory or the directory of the file causing the error.
It could be anything from access permissions or a security block. So it's going to be hard for someone to give you an answer on this without more information.
Things to try:
You can try disabling one plugin at a time until it works.
Look for an error_log (or similar) file
Double check all of the file permissions, chmod and chown
Contact your web host and see if they can provide any insight
If you ARE the web host (or manage the server yourself) then you can check the apache error logs (if enabled) and/or security logs on the server
Double check any errors on the .htaccess file
A script could be consuming too much resources or taking too long to load, you can narrow it down by process of elimination and then disable/patch the culprit

Moved Drupal 7 site to a different server, can't log in

I recently moved my Drupal 7 site to a new hosting server and I'm stuck at the login page. As soon as I try and log in, I get directed back to the same page, but the URL changes from /user to /user/1, which leads me to believe that I am actually logged in, but I'm not being forwarded to the correct page.
I tried cleaning my cache, emptying the cache tables in the DB but nothing helped.
Any ideas?
EDIT: To make things a bit more clear, I've used the specific server for various other Drupal 7 sites, so I know for a fact that the server configuration is not at fault here.
I suspect your $cookie_domain in /sites/default/settings.php is incorrect.
Try making it match your new domain and ensure there's a leading dot .
$cookie_domain = '.mydomain.co.uk';
Sometimes problems relating to logging in after a site migration can be because mod_rewrite was enabled on the first machine but not the second. A simple way to test this is to use the ?q= URL format (http://site.localhost?q=user) and see if you can log in like that. If that works then you can either disable clean urls from within the Drupal interface, or enable mod rewrite in Apache.
In my case the issue was solved only after refreshing .htaccess file in drupal root folder.
You can take the source here: https://github.com/drupal/drupal/blob/7.x/.htaccess
seddonym's comment about mod_rewrite led me to a slightly different solution. I was having the same problem but was able to solve it by copying the file rewrite.load from /etc/apache2/mods-available to /etc/apache2/mods-enabled.
I think the files in mods-enabled are some sort of link files (I am novice at linux still) but copying the files worked just fine. Maybe someone will come along and tell us the proper way to do this.
Sometimes all you need is to clear the cookies for the domain/website - it's possible you have old cookies alive that are causing this.
Get a cookie manager to help simplify this, e.g.:
Edit This Cookie (for Chrome)
Other answer might be that rewrite php module is not installed, to do that do the followings:
sudo a2enmod rewrite
Restart apache2
sudo service apache2 restart
In my case it was very stupid, on my page.tpl.php, there wasn't any "content" and the page--user.tpl.php didn't get read. Only had the line to show content in the page.tpl.php
Although that it is unlikely that you're as stupid as me. ;) Maybe it will be helpful anyway.
Arne

Resources