I did that weeks ago, and I think I stated that early in the support ticket. My webhost actually wrote a patch to the Rank Match plugin!!! And got it working. Incredible support from them, above and beyond.
This just shouldn’t happen — it’s not normal for a webhost to patch for a plugin. That’s the job of Rank Math.
And while I never had an issue previously with Rank Math, this entire experience has been very disappointing. You guys might want to hire better programmers!!!
Here’s the info from the webhost:
The upload was failing due to wp_handle_upload() not being loaded when Rank Math tries to use it. This function is defined in wp-admin/includes/file.php, which isn’t loaded by default on the frontend or in REST API calls.
I added a conditional include for file.php inside RankMath’s handle_file_upload() function, and the import worked without issue.
[st703email@host kh2025068h7wcc.studio703.com]$ diff /home/st703email/kh2025068h7wcc.studio703.com/wp-content/plugins/seo-by-rank-math/includes/helpers/class-wordpress.php /home/st703email/kh2025068h7wcc.studio703.com/wp-content/plugins/seo-by-rank-math/includes/helpers/class-wordpress.php.KH2025068H7WCC
763,765d762
< if ( ! function_exists( ‘wp_handle_upload’ ) ) {
< require_once ABSPATH . ‘wp-admin/includes/file.php’;
< }
I have patched wp-content/plugins/seo-by-rank-math/includes/helpers/class-wordpress.php on the live site as well .
[st703email@host www]$ cp wp-content/plugins/seo-by-rank-math/includes/helpers/class-wordpress.php wp-content/plugins/seo-by-rank-math/includes/helpers/class-wordpress.php.KH2025068H7WCC
[st703email@host www]$ nano +769 wp-content/plugins/seo-by-rank-math/includes/helpers/class-wordpress.php
[st703email@host www]$ diff wp-content/plugins/seo-by-rank-math/includes/helpers/class-wordpress.php wp-content/plugins/seo-by-rank-math/includes/helpers/class-wordpress.php.KH2025068H7WCC
763,766d762
< if ( ! function_exists( ‘wp_handle_upload’ ) ) {
< require_once ABSPATH . ‘wp-admin/includes/file.php’;
< }
<
Hello,
We have shared this with our developers. We will get back to you once we have an update or solution from them.
In the meantime, don’t hesitate to reach out if you need assistance with anything else.
Thank you.
Hello,
We have identified the source of this issue and it has been logged, so that a fix can be included in an upcoming release.
We apologize for any inconveniences that might have been caused as a result of this issue.
Thank you.
Ok thank you. We can mark this ticket as resolved.
Hello,
We are glad we could address your concern.
Please feel free to create a new forum topic if you do have another question in the future.
It will be our pleasure to assist you again.
Thank you.