Support » Developing with WordPress » Urgent do_action(‘init’) – Slowing down blog to hault

  • I have a blog that typically ran rather slow. Today it slowed to a hault (40 second page loads). I comnbed through the code and by process of elimination removed the following from wp-settings.php and the site runs perfectly fine now (front end and back end)


    What is going on here??!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Sounds like a plugin is causing an issue. Disable any plugins.

    That was actually the first thing I tried. That did not help. Then I used wp-cache after that to temporarily fix it while I was troubleshooting elsewhere. When I removed do_action(‘init’)from wp-settings.php it started loading super fast. I couldn’t figure out what this function was trying to call. Does anyone know and if so is it a bad thing that I removed it?

    do_action(‘init’) calls any functions that have hooked the init handle. Generally, these are plugins. Removing that will probably make them not work.

    Your problem is probably wp_cron being called by init. In 2.1 and up, the cron process is called externally, so one thing that could be your problem is the DNS resolution not working on your webserver to find its own address.

    Regardless of that, you *cannot* remove the init action hook. Too many things rely on it. Akismet, widgets, wp_cron, kses… You will find really odd things going on without the init hook.

    To find out what is relying on init, search your codebase for add_action('init',... and find what’s hooking itself to the init call.

    Thanks! This is very useful. We actually just physically moved the server that it’s on along with an entirely different IP address. I am troubleshooting this now.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Urgent do_action(‘init’) – Slowing down blog to hault’ is closed to new replies.