Hello, I just would like to ask if anyone has a solution to this problem.
We have GoDaddy Managed WordPress Hosting.
define( 'ALTERNATE_WP_CRON', true );As we have a huge requirement for the scheduled to work properly in the website (e.g. getting reports automatically.)
Can anyone recommend how to remove /?doing_wp_cron from appearing to website URL without disabling Alternate WP Cron?
Solved! Go to Solution.
We have already decided to migrate and solve the issue immediately after immigration.
Hey @Ellipse,
After a bit of research, I found that the best solution for this without disabling ALTERNATE_WP_CRON is to add a redirect in .htaccess:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} (^|&)doing_wp_cron= [NC]
RewriteRule (.*) /$1? [R=301,L]
</IfModule>
Sources:
https://newbloghosting.com/why-is-doing_wp_cron-being-added-to-my-urls/
https://wordpress.stackexchange.com/questions/12777/why-is-doing-wp-cron-being-appended-to-my-urls
Fair warning: I haven't tried this and can't vouch for how effective a solution it is or whether or not it will cause any issues with your website.
As always, I recommend doing a full backup of files & database to an external location. Your Managed WordPress backups should work fine if anything goes wrong, but it doesn't hurt to be redundant.
Hope this helps!
May I know how will edit the HTAccess.
Do I simply add it on the #Wordpress section? or I can put it at the very bottom without causing any issues?
Yeah, it should be fine to just add it to the bottom.
I have tried adding it at the very bottom and it causes "Too Many Redirect" error.
There's probably something else creating a redirect. Since this solution uses a redirect, adding it when there's already another redirect happening can loop & cause a "Too Many Redirects" error.
Could be an SEO plugin or url structure setting. You can read a bit about that stuff here: https://www.wpbeginner.com/wp-tutorials/how-to-fix-error-too-many-redirects-issue-in-wordpress/
If can't find or don't want to change/disable the other redirect, this might not be a good solution for you after all. If not, the only thing I can recommend would be to call support to see if they have any further advice.
I do hope you're able to get it to work, though.
We have already decided to migrate and solve the issue immediately after immigration.