AIO WordPress Migrations getting Stuck

If you are performing a WordPress migration, you may notice that the All-in-One WordPress migrator gets stuck when importing your site.

There are a few reasons why this may be happening. We address a few of these reasons below.

 

ModSecurity Rules are Blocking the PHP Script

ModSecurity is a great security engine which we utilise on our hosting stack. However, due to the nature of the all-in-one migration plugin, it may trigger some rules in ModSecurity which causes it to get stuck.

We recommend reviewing whether any logs have been generated in relation to this, you can do this by following the instructions below.

 

1) Go to the ModSecurity section in DirectAdmin: Advanced Features -> ModSecurity and click 'Load Log'

2c32559c4a91f280c8a69724463e070c10b52dde7fb097d0cba3552623e6ae546fccc1a9c2371060?t=793466527a893216bddacc4ecee580e0

 

If no logs are present, it is unlikely that ModSecurity is the cause. However, if you see logs around the time that you are trying to import your WordPress site, then ModSecurity is likely to be the cause of the stuck import.

If this is the case, we'd recommend disabling ModSecurity on your account temporarily. You can do this by clicking 'Status & Disabled Rules' and then setting 'SecRuleEngine' to 'Off', then clicking 'Save'.

9442e3b900138f331d4ec527852b5c40f588476c429e645680324769c87b49db42067592301dd05f?t=505799756c9fcd4456d5a2c57abe4aec

ModSecurity plays a vital role in keeping your site protected. It is strongly advisable to re-enable ModSecurity after your migration.

 

PHP.ini Values are too low

It's also possible that the site you are importing is bigger than the current php.ini values allow for. You can increase these using the instructions below.

1) Go to PHP Selector section in DirectAdmin: Extra Features -> Select PHP Version

2) Go to the 'Options' tab within the PHP Selector interface

3) Amend the following values:

max_execution_time : set this to 360

memory_limit : set this to 256M

post_max_size : set this to 2G

upload_max_filesize : set this to 1G

 

The values proposed above are for a website smaller or equal to 1 Gigabyte. If your site is bigger, you may need to amend the values accordingly. Please raise a support ticket if your site is bigger than 2GB, as our upload_max_filesize value is limited to 2GB, which we can temporarily increase to facilitate your migration.

Please note that you should consider reducing the values in your php.ini file following the migration. These defaults are set to help protect your site against attacks (by preventing large uploads and malicious scripts using all the memory allocated to your account). However, you may need to increase these values to suit your specific application or website, depending on the resources that it requires.

 

Plugin is Outdated or has Bugs

The All-in-One WordPress Migration plugin itself may be the cause of your stuck migration. In recent versions, it doesn't support larger websites without paying to use the plugin.

Alternatively, older versions of the plugin may not be compatible with newer versions of WordPress or other installed plugins.

We have attached an older version of the plugin (version 6.7) to this article, which does allow you to modify the plugin code to facilitate the migration of larger sites. However, using this is at your own discretion and risk.

 

mu-plugins causing a stuck import

mu-plugins is a directory used by WordPress to specify 'Must Use' plugins - i.e. plugins that cannot be deactivated or deleted within the WordPress GUI.

If you are transferring from another web host with a different setup, they may have bundled plugins in this folder that are incompatible with our hosting environment, such as their own caching solution tailored to their environment.

You should check if any files exist in this folder, and delete any that reference the name of your old hosting provider, or any that you do not recognise.

This folder is in the following location: domains -> yourdomain.co.uk -> public_html -> wp-content -> mu-plugins

You can view this folder either in your FTP Client or by using the File Manager in DirectAdmin (System Info & Files -> File Manager)

 

If you have exhausted all the options above, please do not hesitate to contact our Support Team who will be able to assist with migrating your sites for you.