As a digital publisher, one of the worst feelings in the world is losing control over some aspect of production. Maybe your laptop breaks, an employee or key freelancer leaves, or a vital tool disappears. In i30 Media I have built a lot of redundancy, so if something fails we can move to the backup … but what if the backup option has problems of its own? That’s what happened to me this week when one of our WordPress installations had a login problem. I am happy to report that the WordPress login problem was solved, with a relatively minimum level of effort to fix. This post will describe how I dealt with this particular WordPress problem. (Note that it may not be applicable to other situations involving hacked WordPress sites or corrupted databases. Consult the official WordPress resources cited in the post for guidance).
The site in question is the companion website for Genealogy Basics In 30 Minutes. The book launched in September, and since then we have been adding resources to the site including blog posts and free genealogy forms. This week, we launched a new product—a genealogy forms library. There is a digital version, which includes 15 PDF and Excel files, as well as a physical bundle of 50 genealogy forms that are made out of archival-quality acid-free paper.
However, yesterday when I attempted to log into the website to post information and links about the genealogy forms bundles, there was a problem. I got to the login screen OK and entered my password, but it redirected me to the home page of the website.
That’s odd, I thought. Why can’t I log into WordPress? I tried several times on different browsers, but it was the same result. I then checked my other WordPress sites, such as the sites for Excel Basics In 30 Minutes, LinkedIn In 30 Minutes, and Google Drive & Docs In 30 Minutes. There was no issue accessing the dashboard on these other sites.
Was I using the wrong password on the genealogy website? I initiated a WordPress password recovery. I was able to reset my password, but afterwards I still got the redirect problem after trying to log on to WordPress. This was concerning, because even though the site looked OK and people could still check out the book and other elements, I was apparently unable to access the WordPress dashboard to make changes.
The fact that the site was visibly working indicated that my WordPress login problem wasn’t a WordPress hack or security issue. In many cases, WordPress hacks will result in defacement or the creation of ads for porn or bogus pharmaceuticals, and I didn’t see anything like that. In addition, I use security plugins that control most common problems, and follow good security protocol for passwords and user access.
I had a backup for the site (using the Updraft plugin) but I could not even access the plugin screen to restore the backup because I could not log into the site. While it was possible to still make a backup and restore via cPanel or FTP, it would take some time and I feared that the bug or issue would be re-introduced. A third option: manually rebuild the site, which would take the better part of an afternoon.
So I did what everyone does when they encounter a WordPress login problem: I googled how to fix it. There were lots of random blogger solutions, but I paid most attention to what the official source had to say—and the official source is the WordPress Codex “Login Trouble” page. Under “Disable Plugins,” it said:
Some WordPress Plugins may interfere with the login process. Disable all of your WordPress Plugins, either through the admin panel or by removing them from the /wp-content/plugins/ folder, so they will not be recognized by the program.
Alternatively, you can rename the plugins folder to something else temporarily to something like /wp-content/pluginsXX/ and they will not be recognized. Rename the folder back to /wp-content/plugins/ once the base WordPress installation has been recovered.
Now, I don’t know what caused the WordPress login problem, but my suspicions fell on the theme (Salient) or an issue with one of my plugins. I was less inclined to believe the Salient theme was causing the login problem with WordPress, because I hadn’t made any changes to the theme since launch and had also not updated the WordPress installation itself for a few months.
Plugins were another story. I had a few that triggered certain behaviors when errors were encountered, such as a redirection plugin that sent people visiting certain pages or WordPress files to the home page. Maybe one of the redirects was inadvertently triggered, or there was a problem with plugin itself.
So I used the “pluginsXX” trick from the Codex to troubleshoot the WordPress login problem. I went into the cPanel “Files” area, which basically gives me an FTP view of the WordPress installation. I navigated to wp-content, selected the plugins folder, and appended “XX”:
Immediately the front page and login page on the genealogy site changed as various visual plugins and security features (such as captcha) were disabled as the plugins were now turned off. But at least I could finally log into WordPress!
I got to the WordPress dashboard and poked around to evaluate the situation. I didn’t see anything other than the warning about missing plugins. I made another backup with a specialized plugin called Updraft Plus, and exported the posts and other content from the WordPress Tools menu just in case.
I went back to cPanel and opened the pluginXX folder, which showed a list of all installed plugins. I deleted the plugin that handled redirections. Then I renamed pluginsXX to “plugins” which made the plugins once again visible to the WordPress software. I went back to my WordPress genealogy dashboard and reloaded the plugins menu. The remaining plugins reappeared, except for the one I had just deleted. However, they were completely deactivated. So I activated them all (save another security plugin) and loaded the site in another browser. It was back to normal. I logged out, logged in on the original browser, and reactivated the security plugin, then logged out again. Logging in was no problem — I could get back into WordPress.
I think the WordPress login problem was caused by the redirect plugin, possibly because of something in the settings that I messed up rather than the plugin itself. I will probably reactivate it again, but be more careful with which 404s I try to fix, especially with xml or php files.
If you can’t log in to WordPress, the first place you should go is the WordPress Codex “Login Trouble” page. Be careful trying to mess around with FTP, WordPress databases, or WordPress settings that can potentially cause bigger problems than the one described above!