Reputation: 263
I realized that this question has come up in the past, but I haven't been able to find the solution to my problem.
My wp-admin works fine on my localhost. However, when I migrate to to my live server, I'm no longer able to access it. If I do go to mysite/wp-admin, I get a 404 error.
Some things I've tried:
-Disabling all plugins by renaming the folder -Deleting plugins one by one -Changing themes -Editing permissions to 755 for wp-admin folder -Adding the below to my wp-config file:
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
Note that when I add these lines I get an error that "this page has a redirect loop".
I used the standard wordpress .htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Does anybody have any idea what the issue might be? Any ideas are welcome.
Thanks!
Upvotes: 0
Views: 1433
Reputation: 1163
It looks like you've done the standard troubleshooting tests. Try adding the following lines to your active theme's functions.php file.
function flush_my_rules() {
flush_rewrite_rules();
}
add_action('init','flush_my_rules');
Make sure to keep the following lines in your wp-config.php file.
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
Then try visiting your homepage first, then your /wp-admin/ page. See if you continue to get a 404. If you do, try visiting the /wp-login.php page, and see if logging in via there continues to return a 404.
Upvotes: 1