Glad to hear it’s working for you; that’s a significant database size reduction!
I’m not sure what you mean by “What would be the “Hook” name and “Recurrence” period I should be looking for?”
]]>Thank you, John. What would be the “Hook” name and “Recurrence” period I should be looking for?
Side Note: Your amazing code snippet is definitely working. Once it triggered, our database size dropped by almost 50 percent!
Cheers!
]]>You’re welcome!
You should be able to tell if it’s working by checking your Scheduled Actions under Tools in the WP Admin menu.
I would have had the page open before adding the code, then open that page in a new browser tab and compare the results, and then reload that new tab a few more times until the number of scheduled actions stabilizes.
]]>Only one question: How do we know it’s working? 🙂
Our site’s database size did not go down.
Cheers!
]]>You certainly could use wp_cron like you suggest, and that may have crossed my mind when I was working up this code, but hooking it to wp_loaded is simpler and more dependable.
Running the code once a week may not be often enough for plugins like MailPoet, which adds approximately 1,000 completed actions to the database every day. If you were only running it once each week you’d need to increase the batch size to somewhere in the thousands, and then you’re running the risk of the server running out of memory and the clean-up process not completing.
]]>So I will soon try out your fix (after I learn the right way to build a custom core functionality plugin, which I need to know sooner or later anyway).
Thanks so much!
]]>Hi Caroline,
To have a mobile responsive menu, you can either follow the steps in this article or install a new theme. New StudioPress themes, for example, all have responsive menus “built-in.”
John
]]>Good question, Karl. I don’t think I have used that setting.
However, I don’t think it would apply to the context of this article, since the CSS edits I make are in the style.css file, or other similar files, with a text editor and then uploaded via FTP. W3TC would not recognize those as settings changes, as far as I know, since they happen independent of the WordPress admin/dashboard.
John
]]>