WP admin not found 404 error

Posted December 17, 2016 17.1k views
WordPressUbuntu 16.04


From today onwards I am unable to access my page. Whenever I try to access it, it shows not found 404 page. It’s been a year and it was working fine with www until today.

I have set a permanent redirect to www, so that even the non-www version gets redirected to www version of the website using ht.access.

While looking for a solution, I remove the code

RewriteCond %{HTTPHOST} ^$ [NC]
RewriteRule ^.*${REQUEST
URI} [R=301,L]

From my .htaccess file.

After this, if I visit I am able to see the login page. But, if I use, the login page shows 404 not found error.

I am unable to find what’s exactly stopping it from showing login page if I visit www version of the website.

Any help on how to resolve this would be appreciated.

Things I have tried:

Changing the theme
Deactivating all the plugins
changing permission for WP-admin and WP-content to 755

Nothing works.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers

Please try logging into your wp-admin and then look at what is recorded in /var/log/apache2/error.log and share it here. If you can also share your virtualhost configuration from the file in /etc/apache2/sites-enabled it could help.

If you’re using nginx, let us know. The two files you would need then would be /var/log/nginx/error_log and /etc/nginx/sites-enabled/

Hi ryanpq, thank you for the reply,

But seems like the problem was at Google’s end. I am using Google Publish, it might have caused the problem. It is resolved as I contacted them.

I had the same issue after I installed the nginx on my server.
The error was caused by some bad statements in my conf file. I just had to add this to the conf file:

include fastcgi.conf;
fastcgi_intercept_errors on;
fastcgi_index index.php;

I used this tutorial, check maybe it will help.