Cause of issue
Using the Hostinger preview domain feature allows you to see a snapshot of your domain via Hostinger domain in preview domain mode. You will be accessing your site via a temporary preview domain. For example, if your domain is mycoolsite.tld
, the equivalent preview domain in Hostinger will be: mycoolsite-tld.preview-domain.com
When you restore your package to the Hostinger preview domain – it won’t work, and you will get a runtime error: yourpackage.wprime is not a valid migration package
.
The cause is that when Hostinger previews a domain, Hostinger uses a preview domain in its file path, resulting in 404. For example:
/home/uXXXXXXXXX/domains/mycoolsite-tld.preview-domain.com/public_html/wp-content/uploads/prime-mover-export-files/1/yourpackage.wprime
This is not an issue with the Prime Mover plugin but a limitation with the Hostinger preview domain implementation. In fact – any file path that has a preview domain on it will return 404, for example, the path to wp-config.php:
/home/uXXXXXXXXX/domains/mycoolsite-tld.preview-domain.com/public_html/
wp-config.php
If we replace it with a live site path, e.g.
/home/uXXXXXXXXX/domains/mycoolsite.tld/public_html/wp-config.php
It will exist now; however, Hostinger in the background will do a real-time replacement of any file paths containing mycoolsite.tld
and replace it with a preview domain mycoolsite-tld.preview-domain.com
This makes it impossible to fix with any code changes since Hostinger will still run auto-replacements in real time. Two tested solutions are available to migrate the package to your preview domain.
- Migrate only using the live site domain (works with FREE and PRO).
- Migrate inside your Hostinger preview domain (works only with the PRO version).
First solution: Use Prime Mover PRO Custom backup directory feature
Since we now know that any file paths containing the Hostinger preview domain will return 404 – we can change the backup/export directory path to something that does not use the preview domain. This will no longer return 404 and should allow you to migrate the package.
However, changing the backup directory inside Prime Mover is a PRO feature, so you need to have a valid license for this to work. In summary – these are the steps:
- If you still use the Prime Mover FREE version, please purchase a license to upgrade to the PRO version.
- Once the PRO version is activated on your site – go to Prime Mover PRO -> Settings.
- Go to Basic Settings -> Custom backup directory.
- Enter a custom backup directory above all your sites to ensure it won’t use the preview domain on its path. For example:
/home/uXXXXXXXXX/domains/mypackages/
Supposing your WordPress directory root path in your preview domain is this:
/home/u123456789/domains/mycoolsite-tld.preview-domain.com/public_html/
Then enter this value as your custom backup directory:
/home/u123456789/domains/mypackages/
This is how it looks like in the PRO custom backup directory settings:
- Click the “Save” button below the custom backup directory setting. This saves the setting and moves the package from the original uploads directory to the new backup directory path.
- Finally, once the setting is saved, go to Prime Mover PRO -> Packages, and you should see the packages under the new custom backup directory, e.g.
- You should now be able to restore your package without the runtime error since the path to the package no longer uses the Hostinger Preview domain.
Second solution: Use the live site domain to restore your package
The first solution won’t work if you are using the FREE version. If you don’t want to upgrade to the PRO version – you can still migrate the package using your Hostinger live site domain with the FREE version.
Detailed steps are as follows:
- Login to your live site hosted in Hostinger (not a preview domain).
- Install and activate the latest version of Prime Mover (the FREE version will do).
- Restore your package using the package manager method.
- You should not get errors
yourpackage.wprime is not a valid migration package
because the package file path uses no Hostinger preview domain.
The second solution’s only limitation is to have the live site connected to your Hostinger host to restore the package. If you need to test your site in a preview domain environment, use the PRO version of Prime Mover to switch your backup directory to a customized path.
Questions? Issues?
Please get in touch with our technical support team and provide details on all the issues/errors.