How to Fix WordPress Admin Panel Not Working

June 7, 2015

Recently when we were setting up WordPress blog for one of our client, we had hit into one strange issue. The WordPress blog page was loading perfectly fine in the browser, however we could not access the WordPress control panel login.
I tried hard to fix the issue by googling and applying online solutions, but all the suggestions and configuration did not help either.
But i still had hope and confident that there is solution for this and that’s when it strike me about the .htaccess file which is stored in your web host and i went ahead, started scanning and understanding them. Yes, the problem and solution to this lies here in the htacess file.

Thought i would write a blog post about this issue, may be many of you have also encountered this issue when setting up your WordPress website in sub-directory or a sub-folder.

Client Environment:

Client already had static landing single page website setup on one of the sub-directory and wanted to have their WordPress blog installation in a sub-directory by name “blog“, suppose if they had their website at www.clientdomain.com, then the blog should be accessible through the Url www.clientdomain.com/blog and as expected the WordPress Control Panel should be accessible through the Url www.clientdomain.com/blog/wp-admin
However as we mentioned before, this was not happening and below is the .htaccess file changes we made to get this working.

htacess code to be added to your domain’s root directory:

1. Access your website’s root directory through FTP.

2. Look for .htacess file, most probably it’s a hidden file

3. If you don’t find it, create a new .htaccess file and add the below code. This should be present in your domain’s root directory having something similar path /public_html/yourdomain-folder/

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

 

htacess code to be added to your wordpress blog installation folder:

1. Access your WordPress blog directory through FTP.

2. Look for .htacess file, most probably it’s a hidden file

3. If you don’t find it, create a new .htaccess file and add the below code. This should be present inside your domain’s WordPress blog directory having something similar path /public_html/yourdomain-folder/blog suppose if you have installed WordPress in a directory by name blog.

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

We hope this short post was informative and helps in resolving your wordpress admin panel not working issue. Please leave us a comment and how it has helped you in solving for your own WordPress website.

1 Comment. Leave new

responsive web design company
June 7, 2015 11:45 am

Thank you for sharing your info. I truly appreciate
your efforts and I am waiting for your next post thank you once again.

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *