WordPress Plugin and Theme developers aren’t perfect, we make mistakes and when a plugin/theme goes wrong it can take an entire WordPress site out of action. The white screen of death or other errors that stop the website owner accessing the WordPress Dashboard: can’t access the Dashboard, can’t disable a faulty plugin/theme.

So your WordPress site is down after installing or upgrading a WordPress plugin or theme. How do you log back into WordPress?

How to Delete a WordPress Plugin

There’s one surefire way almost anyone can do to recover a WordPress site after a plugin or theme takes a site down. Login to the server using a File Transfer Program (FTP) and manually delete the plugin/theme folder.

I’ve had to do this multiple times over the years, things go wrong. For FTP access I use the free program Filezilla. There’s two versions of Filezilla (client and server), you need the CLIENT version: assuming you are a Windows user Download the FileZilla Client for Windows (there’s links from the above to the Windows 32 bit version and Linux etc… versions). At the time of writing (October 2016) the latest stable version of FileZilla Client is 3.22.1.

After installing Filezilla, run Filezilla and it will look something like this, ready for entering your site FTP login details.

Filezilla Client

Filezilla Client

You should see Filezilla as a program that can connect your websites files to your computer. On the left side you see your computer files and on the right the files on your website: you can use an FTP program to move files from your computer to your site and from your site to your computer. There’s nothing shown above in the right window pane since we haven’t connected to a server yet.

If you’ve never used an FTP program before you need some information about your websites server, your web host (if they include FTP access, some don’t) should have sent you your FTP login details when you first paid for hosting etc…

FTP login details
Hostname : could be an IP address (format- 111.111.111.111) or an ftp URL (format- ftp.example.com
Username : could be a name or email address
Password : a password :-)

I use a Godaddy virtual server, my setting look like this.

Hostname : 111.111.111.111
Username : domainname
Password : This1sPr1vat3

You also need the FTP port. Unless told otherwise by your host it’s either 21 or 22. Try 22 (secure connection), if it doesn’t work try 21 (unsecure).

After loading Filezilla I could enter these in the Quickconnect form at the top or setup a permanent Site under “File” >> “Site Manager”. Only going to deal with Quickconnect, see the Quickconnect screenshot below.

Filezilla Quickconnect

Filezilla Quickconnect

As you can see from the screenshot above after adding my FTP login details for this site I can start to see this sites directory structure in the Filezilla right window pane. I’ve grayed out my FTP username as it makes it easier for hackers to brute force attack the FTP server: if they know the username, they only have to guess (brute force attack) the password.

While on security. Filezilla has a major security flaw in the way it saves FTP passwords, Filezilla saves passwords in an XML file (like a text file) with no protection, IF you save your passwords and someone manages to acquire your Filezilla XML file they have all your login details! I had a server hacked a while ago and reasonably confident they got the login details (they logged directly into sites via FTP rather than the server itself) was due to saving passwords in Filezilla and running an out of date Windows Internet Explorer Adobe Addon. So if you create a site under “File” >> “Site Manager” do NOT save the password (OK to save the other details).

Deleting a Plugin Folder

Recently ran into a problem with updating EWWW Image Optimizer to version 3.0.0 (version 3.0.2 fixes this issue). The plugin developer hadn’t tested the 3.0.0 release on servers running PHP 5.3 or PHP 5.4 (in my tests it worked fine in PHP 5.5.*, 5.6.* and PHP 7.0.*). For the record WordPress recommends running PHP 5.6, but there’s still a fair number of servers (including the one this sites on) running PHP 5.3 and 5.4, so developers should test in other environments. I use WAMPserver 3 for localhost testing and test in PHP 5.3, 5.4, 5.5, 5.6 and PHP 7.0.*.

Fortunately I’d disabled EWWW Image Optimizer 2.9.* on this site before the upgrade, I upgraded to version 3.0.0 and when reactivating the plugin got the parse error, but the error didn’t take the site down: WordPress won’t activate a plugin that outputs a fatal error. Unfortunately WordPress doesn’t deactivate an active plugin that outputs a fatal error, so when users on PHP 5.3 and 5.4 servers upgraded EWWW Image Optimizer to version 3.0.0 it resulted in their sites going down.

This is the parse error message I saw:

Parse error: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in /home/******/public_html/wp-content/plugins/ewww-image-optimizer/common.php on line 1764

Only ways to fix this is either fix the common.php file or delete the /ewww-image-optimizer/ folder to deactivate the faulty plugin.

I posted a solution at EWWW Image Optimizer Parse Error expecting T_PAAMAYIM_NEKUDOTAYIM v3.0.0 Fix which is included in version 3.0.2, but some users aren’t confident with FTP etc…, hence this FTP tutorial.

To delete a WordPress plugin is easy once you are logged in using an FTP program like Filezilla. Will take you longer to read this tutorial vs deleting the plugin folder :-)

On the right window pane look at the directory names and if you have an error message follow the directory path to where the plugin is. From my error message above the directory structure is this bit:

/home/******/public_html/wp-content/plugins/ewww-image-optimizer/common.php

Not all servers have the same directory structure, some will use /www/ in place of /public_html/, but the important part is finding your way through the folder /wp-content/ to the folder /plugins/ (this is where WordPress plugin files are located).

From my earlier screenshot you can see the /home/ folder and I’m in the grayed out folder (I’m calling it /******/ above). Based on the error message the next folder to go through is /public_html/.

Filezilla public_html

Filezilla public_html

Next is /wp-content/ followed by /plugins/.

Filezilla /wp-content/plugins/ Folder

Filezilla /wp-content/plugins/ Folder

To delete the EWWW Image Optimizer plugin delete the /ewww-image-optimizer/ folder. To delete a folder “Right Click” the folder and select “Delete”.

Filezilla Delete Folder

Filezilla Delete Folder

You can make a backup of the folder before deleting it. “Right Click” the folder and select “Download”. Wait for the folder content to download, then delete it. If you’ve deleted the wrong folder you have a copy of it on your computer you can re-upload.

If you have a Control Panel for your website it might have a file browser you can use to delete folders etc…. Each Control Panel is different, but the directory structure listed above will be the same. Follow the folders to the /wp-content/plugins/ folder and delete the /ewww-image-optimizer/ folder.

After the /ewww-image-optimizer/ folder has been deleted the next time the website is accessed WordPress will automatically deactivate the plugin. Now you can login to your WordPress Dashboard etc… In this example the EWWW Image Optimizer plugin will no longer exist (or be active) on the site. If you want to use the EWWW Image Optimizer plugin reinstall it under the WordPress Plugins section of your Dashboard. EWWW Image Optimizer plugin version 3.0.2 works in PHP 5.3/5.4 so if this was the problem you can safely install the new version.

The above also works for WordPress Themes, only difference is themes are located under /wp-content/themes/ rather than /wp-content/plugins/. When deleting WordPress themes this way be aware a theme must be active for WordPress to work (the folder /wp-content/themes/ cannot be empty). Under the /wp-content/themes/ folder you should see at least one of the default WordPress themes.

Filezilla Default WordPress Themes

Filezilla Default WordPress Themes

As you can see in the screenshot above on my server there’s two of the default WordPress themes, TwentyFifteen and TwentyFourteen. I’m currently running the Stallion Responsive Child Theme, if I deleted either of the folders /stallion-responsive/ (folder for the Stallion Responsive Parent theme) or /stallion-responsive-child/ (folder for the Stallion Responsive Child theme) the default TwentyFifteen theme** would activate (I’m running WordPress 4.6.1 currently).

** I think it’s Twenty Fifteen, if you download WordPress 4.6.1 and check the /wp-content/themes/ folder there’s three themes /twentyfourteen/ (Twenty Fourteen theme), /twentyfifteen/ (Twenty Fifteen Theme) and /twentysixteen/ (Twenty Sixteen theme): so could be Twenty Fourteen that’s activated? I probably deleted the /twentyfourteen/ folder a while ago.

If the SEO theme I develop, Stallion Responsive (or the Stallion Responsive Child theme) broke on on my site I’d delete the /stallion-responsive/ folder. When I access the site again WordPress will automatically activate a default theme (think it’s Twenty Fifteen: will confirm later) so I can log back into the sites Dashboard.

That should get you back into your WordPress Dashboard when a faulty plugin or theme takes a site down.

Update: Did some digging through WordPress 4.6.1 code and figured out what would happen if the active theme folder is deleted, there’s a fallback theme feature.

The Fallback WordPress Theme

The fallback theme is the WordPress theme WordPress will activate if you delete the active themes folder (as described above) or if the themes style.css file is missing: means you could deactivate a theme by deleting or renaming the themes style.css file.

In WordPress 4.6.1 the fallback theme is Twenty Sixteen if the /twentysixteen/ theme folder exists.

Twenty Sixteen is not installed by default if you’ve upgraded WordPress from an earlier version before Twenty Sixteen existed. If the /twentysixteen/ folder doesn’t exist, WordPress 4.6.1 checks through this list until it finds a default theme that exists.

/twentysixteen/ = Twenty Sixteen Theme
/twentyfifteen/ = Twenty Fifteen Theme
/twentyfourteen/ = Twenty Fourteen Theme
/twentythirteen/ = Twenty Thirteen Theme
/twentytwelve/ = Twenty Twelve Theme
/twentyeleven/ = Twenty Eleven Theme
/twentyten/ = Twenty Ten Theme
/default/ = WordPress Default Theme
/classic/ = WordPress Classic Theme

If none of these exist, WordPress won’t have a theme to fallback on. Solution is download one of the default WordPress themes and upload it to /wp-content/themes/ using FTP.

As you can see in my WordPress installation I have these two folders under /wp-content/themes/ :

/twentyfifteen/
/twentyfourteen/

If I deleted the active theme (Stallion Responsive or the Stallion Responsive Child Theme), WordPress would fallback to Twenty Fifteen.

David Law

David Law > AKA SEO Dave
*
: Experienced WordPress SEO Expert, Internet Marketer, Developer of the Best SEO Package Stallion Responsive WP SEO Theme (tested to WordPress 4.7 December 2016) and Nice Guy :-)

Website - SEO Tutorial for WordPress