A change in hosting provider or server ends up in website migration.

As such, WordPress websites offer hassle free migration. However, plugin incompatibility or bad file permissions often results in WordPress migration Internal Server Error.

At Bobcares, we frequently get requests from our customers to fix WordPress errors as part of our Server Management Services.

Today, in this write up, we’ll see the top 5 reasons that cause WordPress migration Internal Server Error and how our Support Engineers bring website back online.

 

What does WordPress migration involve?

Let’s begin by checking the WordPress migration process and how it causes Internal Server Error.

Basically, WordPress websites contain file content and a MySQL database. While migrating the website to a new server, we need to migrate both of them. Usually, the migration involves using backup and restore tools or third party migration plugins.

For example, in a cPanel server, the quickest way to migrate WordPress would be to take a complete backup of the account and restore it on the new server. After restoring, when there are problems with the WordPress content, the website show up 500 Internal Server Error.

WordPress migration Internal Server Error

This can appear in the website or at the admin interface of the WordPress.

 

Top 5 reasons for WordPress migration Internal Server Error

In general, Internal server error gives no clue on the real reason for the problem. As a result, it becomes really tricky to find the real reason and fix it.

From our experience in managing WordPress websites, our Dedicated Engineers see 500 internal server error happen due to many reasons. Let’s now have a look at them.

 

1. Incorrect permissions

First and foremost, incorrect permissions of the WordPress files can result in Internal Server Error.

Migration always involve copying website files from one server to another. Here, the usernames on both old and new server may be different. Also, often the copying of files will be done by the root user too. For all these reasons, the permission and ownership can easily go wrong.  As a result, the hosting web server cannot read the site files and can result in WordPress errors.

 

2. Corrupt .htaccess

Yet another reason for Internal server error in WordPress is corrupt .htaccess.  All website redirection happens according to the rules added in .htaccess file. These rules again depend on the path of the WordPress files and folders. Missing .htaccess file can also cause Internal server error too.

 

3. Mismatch in PHP settings

For the proper migration of any website the settings on the old and new server should match. These settings involve the software versions, PHP memory limit, time out settings and many more. Often, when the hosting account is set up with lower memory limits on the new server, it can result in WordPress errors. The same is applicable with the version of PHP too.

 

4. Incompatible plugins

In general, WordPress make use of many plugins to achieve certain user friendly features. This includes Yoast SEO plugin that decides site ranking, WP total cache for managing cache of the website and so on.  These plugins may not be compatible on the new server can can show up website errors.

Similarly, often customized themes can also create problems with WordPress.

 

5. WordPress core inconsistencies

Usually, migration need data transfer over various networks. Thus, there can be corruption with WordPress core files as part of the website migration. This can also lead to 500 internal server error. Usually, this affect the contents of the folders wp-admin, wp-includes, etc.

We just saw the top 5 reasons that would cause WordPress migration Internal Server Error. Its time to check the fixes for each of them.

 

How we fix WordPress migration Internal Server Error ?

When customers report Internal Server error with their WordPress websites after migration, our Dedicated Engineers do a systematic approach to fix it.

As part of bringing the server back online, we do the following.

 

1. Replicate settings of old server in new

Ideally, the sure-shot fix in WordPress migration is to avoid errors as such. For this, prior to migration our Dedicated Engineers always replicate the old server settings on the new server. We set the PHP version, per account limits, Web server, Database server, etc. according to the source server.

And, we proceed with migration of web content only after version compatibility check too. Here, we double check and ensure that the new website has proper WP_MEMORY_LIMIT value set. We also set proper PHP limits for the site.

Again, we turn on the debugging option in WordPress by adding the following in the wp-config.php file of the WordPress installation.

define( "WP_DEBUG", true );

 

2. Correct file permissions and ownership

Next, we check and correct the permissions and ownership of the WordPress files. We set the permissions of the files to 644 and folders to 755.

Also, we change ownership of the WordPress files and folder to that of site’s user. For this, we execute:

cd /home/username
chown -R username:username public_html

This would set the correct ownership for the WordPress files in the home directory of the user. These permissions again depend on the user ownership under which the web server runs. For instance, when the web servers run under ‘nobody‘ ownership, the files should be readable and writable by nobody user too.

 

3. Correct .htaccess code

After correcting, the permission and ownership, the next step is to verify the code in .htaccess file. We look for any conflicting rules. To eliminate the error due to corrupt .htaccess file, we simply rename the .htaccess file.

mv .htaccess original_htaccess

We, then add the default .htaccess rules in the file. If the reason was problematic rule, that would load the WordPress website page with out any errors. Then, we help customers to correct the custom rules in the .htaccess files.

 

4. Verifying Plugins

Apparently, in many cases, even correcting the .htaccess file may not correct website errors. The next part is to verify the plugin compatibility check. This is a lengthy procedure. Here, we disable each plugin by moving the particular plugin directory. And, then we check the WordPress website in the browser. Our Support Engineers continue this process until we eliminate the faulty plugin.

Additionally, we reset the WordPress theme to a default one, to rule out the possibility of faulty themes too. This is done from the WordPress admin panel. We always make sure to set a theme that is free from vulnerabilities.

The screenshot shows selecting Twenty Sixteen theme from installed themes.

Reset WordPress theme

 

5. Replace WordPress core

In certain WordPress websites, even the plugins may not be causing the problems. It will be the core WordPress files that causes the Internal Server Error. To fix the problem with file corruption, we do a re-upload of the wp-admin and wp-includes folder from a new WordPress install.

This will not affect the website content as they are fetched from the WordPress database.

[Facing WordPress migration errors? Our Server Experts can fix it in a jiffy.]

 

Conclusion

Concisely, the common reasons for WordPress migration Internal Server Error on any website include restrictions in memory_limit, incorrect file permissions, etc. Today, we saw the various reasons and how our Dedicated Engineers follow a systematic approach to bring back the website online.



Source link

Author

Write A Comment