WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What impact does disabling do_action('admin_init'); in admin.php make? I disabled this function because Whenever i was trying to insert featured image, I get 404 error, i.e. media-upload.php and ajax-admin.php was not found in the server.

After disabling do_action('admin_init'); , everything worked fine except admin design was gone. I then manually hooked colors-classic.css.

Thanks Sabin

share|improve this question

What it does: It offers an action handler, a moment in run time to execute other functions.

So it is a hook for plugins and core functions. Removing all hooked functions or changing the core file will break WordPress.
If your plugin fails to work with it – fix the plugin.

share|improve this answer
I tried disabling all the plugins but in vain, thats why what i did was something i could to at last. The error was caused due to do_action("admin_init"). Disabling this function fixed the 404 error problem. But, still I know disabling this hooked function might make impact on the system. – WatsMyName Mar 19 '12 at 8:52
Find out what exactly happens, don’t just delete random code. Xdebug or similar tools will tell you what goes wrong. – toscho Mar 19 '12 at 8:54
Okay i discoverd, this was due to APC installed in the server, I disabled APC using ini_set and fixed the problem Thanks for helping. – WatsMyName Mar 19 '12 at 9:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.