WatsMyName
WatsMyName

Reputation: 4478

404 page cannot be found error in wordpress admin

I m facing very weird problem in wordpress wp-admin. I was trying to upload image to the post and i encountered a problem. I turned on firebug and saw http://www.mysite.com/wp-admin/media-upload.php?post_id=36671 is not found (404 error), Addtionally, http://www.mysite.com/wp-admin/ajax-admin.php is not found as well [in firebug]

actually the file DOES EXIST in the right folder in the server. I then edited this file put following lines at top of the page

echo "Hello World";
exit;

Now the file is found. Can anybody suggest a solution? My wordpress version is 3.3.1

THE ISSUE CREATOR.

The problem creator line was do_action('admin_init'); i commented line do_action('admin_init'); in admin.php now everything works except that ADMIN design is messed up. Any Help will be appreciated.

EDIT : I turned on WP_DEBUG, And i just see Notices, 500s of them, I don't see any other warnings or errors.

Thanks Sabin

Upvotes: 0

Views: 3934

Answers (3)

Matthew T Rader
Matthew T Rader

Reputation: 176

I was having this problem also, I even did a fresh WordPress install and was still having it. All you need to do is upgrade your PHP version.

I went to my control panel and in the software/services section there's a button that says php configuration, when you click on that a little drop down menu appears and there you can chose the latest version of PHP, which I was on 5.2 and upgraded it to 5.5. When I did that the 404 errors went away.

Upvotes: 0

WatsMyName
WatsMyName

Reputation: 4478

I fixed this problem doing following stuffs.

I commented do_action('admin_init'); on admin.php in wp-admin folder.

This messed up the admin design, then I added following lines in my theme's functions.php

function itg_admin_css_all_page() {

wp_register_style($handle = 'itg-admin-css-all', $src = "/wp-admin/css/colors-classic.css", $deps = array(), $ver = '1.0.0', $media = 'all');

wp_enqueue_style('itg-admin-css-all');
}
add_action('admin_print_styles', 'itg_admin_css_all_page');

And this solved the problem temporarily.

Upvotes: 1

Milap
Milap

Reputation: 7231

Good luck..

Upvotes: 0

Related Questions