HerrimanCoder
HerrimanCoder

Reputation: 7226

a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request

I just moved my wordpress site from one hosted server to a different one, at a different company. After the migration I am getting the error "a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request". I have read posts about this error on stackoverflow and other sites, and they're all saying to try 3 things:

  1. Open up permissions on the root folder - tried it - no difference
  2. Tweak with .htaccess file - tried it, but no idea what I'm doing
  3. Disable plugins - no idea how

Here's what my path looks like in cpanel:

enter image description here

And here is the full path: /home/usaarbit/public_html/Do********on/PrimaryResidentialUS (I obscured my client's name).

Here is my .htaccess file:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /~PrimaryResidentialUS/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /~PrimaryResidentialUS/index.php [L]
</IfModule>

# END WordPress

I have tried changing the rewrite rule paths to the one mentioned about and several other variations, all to no avail. Maybe this file has nothing to do with it, I don't know.

No error_log is being created anymore. Earlier today I was getting an error_log file because I was missing some files. That has been fixed -- all files are there now. But no error_log file is being created anymore, I just get that ugly error.

I don't know wordpress all that well but I suspect there is 1 simple tweak someplace that will fix this. Should I look into disabling an add-on? If so, how do I do that? Any ideas?

Upvotes: 0

Views: 15829

Answers (2)

anupam
anupam

Reputation: 756

What happen if you remove the ~ signs from the .htaccess file? Your new .htaccess file should look as follows:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /PrimaryResidentialUS/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /PrimaryResidentialUS/index.php [L]
</IfModule>

Let us know. I also doubt about the RewriteBase path. Have you copied the htaccess from the old server? If yes, you need to make sure the path for WordPress installation in the new one and adjust the path accordingly. If my above suggestion does not work, try the following see if it works or not.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

You might get help from https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

Upvotes: 2

user3105700
user3105700

Reputation: 355

What is going on is the PHP file(or whatever back end language you are using) is failing on the attempt to load the ErrorDocument which, 9 times out of 10 when moving websites from one place to another, means that you either didn't import the database from one place to another correctly or that you have different MySQL user information which would change the access to the MySQL server, causing error documents that depend on fetching information from that to fail. I would recommend exporting all information from the previous Wordpress installation and reinstalling Wordpress at the new source. This would reconfigure WordPress to work at the new location and use the new MySQL username and password, rather than your old one.

Upvotes: 0

Related Questions