Warning: Use of undefined constant _adsense_inserter - assumed '_adsense_inserter' (this will throw an Error in a future version of PHP) in /home/customer/www/thinklandingpages.com/public_html/wp-content/plugins/adsense-inserter/settings.php on line 86

Warning: Use of undefined constant _marketing_magnet - assumed '_marketing_magnet' (this will throw an Error in a future version of PHP) in /home/customer/www/thinklandingpages.com/public_html/wp-content/plugins/marketing-magnet/settings.php on line 142

Warning: Use of undefined constant _popup_express - assumed '_popup_express' (this will throw an Error in a future version of PHP) in /home/customer/www/thinklandingpages.com/public_html/wp-content/plugins/popup-express-pro/settings.php on line 312

Warning: Use of undefined constant _pricingTableDynamite - assumed '_pricingTableDynamite' (this will throw an Error in a future version of PHP) in /home/customer/www/thinklandingpages.com/public_html/wp-content/plugins/pricing-table-dynamite-pro/settings.php on line 131
Login to WordPress When You Can’t Get to wp-admin or wp-login.php | Think Landing Pages

Login to WordPress When You Can’t Get to wp-admin or wp-login.php

Recently, I had a customer contact me about not being able to get to the login screen on her site. She was using our Simple Maintenance Mode Pro plugin. Apparently, her theme was set up to redirect wp-admin and wp-login.php to a custom page. The custom page was block by the maintenance mode plugin and any attempt to access the login screen would display the maintenance mode page.

At first, I thought there was no other solution than to get into the backend and modify the maintenance mode plugin to by-pass calls to the custom page. Then I figured out a workaround.

Note- This approach will only work if the redirect to the custom page happens after wp-login.php tries to process the login.


Step 1 – Get a copy of the login form from wp-login.php

<form name="loginform" id="loginform" action="http://www.yourwebsite.com/wp-login.php" method="post">
<p>
<label for="user_login">Username<br />
<input type="text" name="log" id="user_login" class="input" value="" size="20" /></label>
</p>
<p>
<label for="user_pass">Password<br />
<input type="password" name="pwd" id="user_pass" class="input" value="" size="20" /></label>
</p>
<p class="forgetmenot"><label for="rememberme"><input name="rememberme" type="checkbox" id="rememberme" value="forever" /> Remember Me</label></p>
<p class="submit">
<input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="Log In" />
<input type="hidden" name="redirect_to" value="http://www.yourwebsite.com/wp-admin/" />
<input type="hidden" name="testcookie" value="1" />
</p>
</form>


Step 2 – Replace domain with your domain

There are two places in the form you need to update with your domain.

<form name="loginform" id="loginform" action="http://www.yourwebsite.com/wp-login.php" method="post">
<input type="hidden" name="redirect_to" value="http://www.yourwebsite.com/wp-admin/" />

Step 3 – Save, open, and login

Save the file to your hard drive or server. Then open it and log in.

Posted in Tutorial
How To Get 4,692 Subscribers
The step-by-step guide to more conversions
  • The one thing you must do to get subscribers
  • How to find the traffic that converts more than any other traffic
  • What to include in your auto responsder to keep 'em subscribed
  • The exact method I use to skyrocket my email list to more than 4692 subscribers

Download Now