-
I am trying to import the Rank Math json file from another site and it leads to a critical error every time. We have tried a number of workarounds and nothing is working.
We have tried to import the json in pieces, and all of it as a whole. We made a duplicate clone of the original site and tried that with separate export / import. We thought it might be a PHP issue so we confirmed the PHP version is the same on both sites. We tried deactivating plugins and going to the wordpress default theme.
I’ll include the logins for each of the sites so you can help me troubleshoot.
Here is the error it generates in a popup:
<p>There has been a critical error on this website.</p><p>Learn more about troubleshooting WordPress.</p>
-
Hello,
We apologize for the issue you are facing with importing the Rank Math JSON file. It sounds like you’ve already taken several steps to troubleshoot the problem, which is great.
The critical error you are encountering could be due to various reasons, including memory limits or conflicts with other plugins or themes. Here are a few additional steps you can try:
-
Increase PHP Memory Limit: Sometimes, increasing the memory limit can help resolve import issues. You can do this by adding the following line to your
wp-config.php
file:define('WP_MEMORY_LIMIT', '256M');
-
Check Error Logs: Since you mentioned that you have access to the logins, checking the server error logs might provide more insight into what is causing the critical error.
-
Use a Staging Site: If you haven’t already, consider creating a staging site where you can test the import without affecting your live site. This can help isolate the issue.
-
Update Rank Math: Ensure that both sites are running the latest version of Rank Math, as updates often include bug fixes and improvements.
-
Contact Hosting Provider: If the issue persists, it might be worth reaching out to your hosting provider to see if there are any server-side issues that could be causing this error.
If none of these solutions work, please reply to this ticket with the specific site URLs and any relevant error messages from your logs, and a human agent from our support team will assist you further. Thank you for your patience!
In the original ticket, I did mention that my web host determined it was not a server error and they suggested I contact Rank Math support.
Plugin version is current at both websites.
I increased the memory limit at your suggestion, first to 256MB and then to 512MB. Same critical error both times on the import.
– I did not do this on the test site where we generated the export file, so if you want me to do that, please let me know.I had included a ZIP file of the error log in the first support ticket, and there doesn’t appear to be a way to upload one in this response. If you’d like to see the error log, I’ll be happy to send it. There are several Rank Math-related errors noted, I’m sure it would be helpful.
Hello,
We would like to download the export file from the source website you mentioned in the Sensitive Data section but the URL there is not complete. Can you please share the full URL of the WP admin dashboard so we can reproduce the issue you’re experiencing from your end?
Feel free to share the error log using this tool: https://wetransfer.com/
Also, please share the FTP login here for the target or live website.
Looking forward to hearing back from you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
I also updated the sensitive data area with the WeTransfer link and the FTP logins. Thank you.
Hello,
The route we use to import the file is returning a 500 error on the site:
It is a server error, and the details should be logged in the server error log. Please check with your host and ask them to share the detailed error so we can assist you further.
Looking forward to helping you.
I requested that error log from my support but they directed me to the same file I sent you earlier; it is updated because there have been more errors since I sent it.
I have re-sent that through WeTransfer.
Another thing has just gone wrong with this website. We use ACF to generate team bios and it’s a feature that’s been on this site for years. Suddenly, the individual bios have all disappeared. The team page pages are still there, but if you click on the person, it’s a blank page.
I really need to know what’s happening with this site — between the json not importing and now this ACF glitch, this is getting very concerning.
I just received an update from the webhost, so I’m passing that along to you in the sensitive data area.
Hello,
wp_handle_upload
is a default WordPress function. Since the error is about it being undefined, it will likely mean that a theme or plugin conflict is causing the request to run in an unusual context. Please follow this guide to check for a possible plugin conflict: https://rankmath.com/kb/check-plugin-conflicts/Let us know how that goes. Looking forward to helping you.
Thanks, I did that and followed the instructions. It failed at the first step:
With all plugins disabled and your theme set to the default Twenty Twenty Four, try reproducing the issue.
(a) If you still have the issue, your WordPress setup is the root of the problem.
What is the best way to correct this? If I install a blank wordpress on a test server, and then use Migrate Guru to transfer the site, I’m concerned it will transfer the WordPress problem again. How can I clone the site without cloning wordpress?
Or is there a way I can resolve the WordPress without having to clone it to a test server?
Hello,
You can re-upload a fresh copy of WordPress core files (from wp-admin and wp-includes) via FTP or hosting file manager to ensure no files are corrupted or missing.
Alternatively, if you have WP‑CLI access, you can reinstall core files without touching your content:
wp core verify-checksums wp core download --force
This avoids migrating the potentially problematic settings.
Once you’ve reinstalled the core and ensured wp_handle_upload is available, try the JSON import again. If issues persist, try exporting your Rank Math settings and then follow this guide to completely uninstall Rank Math and reinstall it again: https://rankmath.com/kb/uninstall/#:~:text=Here%E2%80%99s%20how%3A%201%201.%20Log%20into%20your%20WordPress,for%20the%20page%20to%20reload%2C%20then%20click%20Delete
Let us know how it goes. Looking forward to helping you.
Thank you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
I updated the sensitive area with the latest error log. It appears to be the same error — putting that in context, I installed a new WordPress in both the live site and the source site on the test server. Then generated a clean JSON file and attempted to upload that — same ‘critical error’.
This has been going on for WEEKS now. Is there any other way to get these settings into the live site? Our SEO is suffering because we don’t have our meta data properly in place.
My webhost informed me that ACF Pro and Advanced Themer both call wp_handle_upload in the same way, and to dry disabling those plugins.
So I tried that — starting with the test server, deactivated both and create a clean JSON file Then deactivated both plugins and tried the import. Failed with the same critical error.
Hello,
Please follow this guide to completely uninstall Rank Math and then reinstall it again: https://rankmath.com/kb/uninstall/#:~:text=Here%E2%80%99s%20how%3A%201%201.%20Log%20into%20your%20WordPress,for%20the%20page%20to%20reload%2C%20then%20click%20Delete
After doing that, please try importing the settings again.
Let us know how it goes. Looking forward to helping you.
Thank you.
-
The ticket ‘cannot import – critical error’ is closed to new replies.