This site can’t be reached 127.0.0.1 refused to connect wp-admin error

0
37
Wp admin page redirects

This site can’t be reached 127.0.0.1 refused to connect wp-admin error

When you tried to access wordpress admin url it redirect to 127.0.0.1 and says This site can’t be reached 127.0.0.1 refused to connect. In most cases its your security plugin, which rewrite you .htaccess file and shows error in some cases.

1 .Access your .htaccess file

First you need to access your .htaccess file via hosting cpanel or filezilla. Default .htaccess look likes below:Basic WP

# BEGIN WordPress

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

# END WordPress

If you setup some security plugins like All in one security, it may put some security codes which looks like:

#AIOWPS_ENABLE_BRUTE_FORCE_PREVENTION_START
RewriteEngine On
RewriteCond %{REQUEST_URI} (wp-admin|wp-login)
RewriteCond %{HTTP_COOKIE} !aiowps_secret= [NC]
RewriteCond %{HTTP_COOKIE} !aiowps_cookie_test_dqt1r00nia= [NC]
RewriteRule .* http://127.0.0.1 [L]
#AIOWPS_ENABLE_BRUTE_FORCE_PREVENTION_END

Now remove the codes and you will be able to access your wordpress admin dashboard.

 2. scan your site

Scan your site for malware here: https://sitecheck.sucuri.net/  and make sure your website is not hacked.

3. Update site and home url

Add these two lines to your wp-config.php, where “example.com” is the correct location of your site.

define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');

 

0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments