Understanding how WordPress installs plugins

By David Anderson Posted Category Guides and resources Topics WordPress,

Understanding how WordPress installs plugins is a great piece of knowledge: 1) it’s actually fairly simple, and 2) it can get you out of a lot of problems. In this article, we’re going to learn about that, and see what we can do with it.

Of course, you should try all the tips and tricks mentioned below on a test site, rather than any website that provides your household income!

WordPress stores all of its plugins in a particular folder in your website. By default, it is wp-content/plugins. If you use FTP (or cPanel file manager, or whatever), to go there, then you should see one folder for each plugin.

You can probably recognize most of the plugins from the folder names – they are related (but do not have to be exactly equal).

Plugin installation = unzipping: nothing more, nothing less

Section titled Plugin installation = unzipping: nothing more, nothing less

What happens when WordPress installs a plugin? Actually, not very much: it takes the plugin’s zip file, and unzips it into wp-content/plugins. That’s all.

In other words, you can do the same thing by hand. 1) Get a plugin zip (e.g. find one from WordPress – find the ‘Download’ link) and download it to your PC/Mac 2) Unzip it (N.B. some computers, especially Macs, do this automatically when you download). 3) Upload the resulting folder into wp-content/plugins. Then, when you visit the WordPress ‘Plugins’ page, you should see the plugin listed, ready to be activated.

Deleting plugins = removing files: but be aware of activation issues

Section titled Deleting plugins = removing files: but be aware of activation issues

This being so, you can also delete a plugin simply by deleting the corresponding folder in wp-content/plugins. But note… if the plugin was active, then the front-end of your site will disappear (i.e. the “white screen of death”) – because WordPress expects active plugins to exist. WordPress has its own list (in its database) of which plugins are active. It’s only safe to delete an inactive plugin, if you don’t mind your site going down.You can bring the site back up by bringing the files back.

Bringing the files back isn’t the only thing you can do. WordPress has tricks up its sleeve. The back-end of your site (i.e. WordPress dashboard) will still load – the dashboard is coded to be ready for missing plugins. The dashboard will simply skip any plugins that are missing. And when you visit the ‘Plugins’ page in your dashboard, WordPress will then de-activate the missing plugin – bringing the front-end of your site back to life.

Using this knowledge when your site breaks

Section titled Using this knowledge when your site breaks

With this knowledge, you are now ready to do several trouble-shooting tasks.

Firstly, we’ve probably all experienced a new plugin update completely breaking your site. Perhaps it wasn’t tested on the version of WP or PHP you’re using – or perhaps it has a conflict with another plugin you have, and nobody’s yet reported this to the plugin author.

Well, what has happened when WordPress updates a plugin? Nothing very clever: it downloaded the new zip file, removed the previous directory from wp-content/plugins, and unzipped the new zip file into there. You can reverse these steps by hand. i.e. Get the zip of the old plugin (e.g. from the ‘Developers’ tab on the plugin’s page if it was a plugin from the WordPress.Org directory), unzip it, remove the existing directory from wp-content/plugins, and add your newly-unzipped one.

Or, you can simply rename the plugin’s directory (so that WordPress can no longer find it – e.g. rename wp-content/plugins/myplugin to wp-content/plugins/myplugin-disabled), and then log in to the WordPress dashboard and visit the “Plugins” page – WordPress will then de-activate the problematic plugin. (It will not re-activate it after you rename the directory back – which you will need to do if you want WordPress to match the plugin with the right plugin from its plugin repository).

What have we learned in this short article? We’ve learned that in WordPress, plugins each have their own directory in wp-content/plugins (by default). When WordPress is manipulating (i.e. installing, updating or removing) a plugin, all it’s doing is adding, changing or deleting a directory from there. The only other thing involved is the list that WP keeps in its database of which of those plugins is considered “active”. This means that you can do the same things that the WordPress dashboard does, by moving the files around yourself. This knowledge is sometimes useful when your site breaks, and can help you fix simple issues without needing to look for outside support, or to wait for it to arrive.

About the author

Profile Image of the author - David Anderson

David Anderson

David is the owner and founder of TeamUpdraft. David released the first version of UpdraftPlus back in 2011. Today, David is still our lead developer, ensuring quality runs through everything we do. David is passionate about quality coding, privacy and doing the right thing by our users and the WordPress community.

TeamUpdraft

We’re the team behind some of the WordPress community’s most loved WordPress plugins.

Developers, designers and website owners trust us to back up, migrate, optimize and secure more than 5 million WordPress websites worldwide.

More stories

  • WordPress migration plugins compared

    We put top migration plugins like UpdraftPlus, Duplicator, and Migrate Guru to the test. See which performs best under real-world conditions!

  • UpdraftPlus vs WP Vivid

    Compare UpdraftPlus and WP Vivid to determine which backup solution best meets your WordPress site’s needs for security and reliability.

  • WP-Optimize vs WP Fastest Cache

    Discover the key differences between WP-Optimize and WP Fastest Cache to find the best plugin for improving your WordPress site speed.

  • WP-Optimize vs W3 Total Cache

    Compare WP-Optimize and W3 Total Cache to discover which plugin is best for improving WordPress speed, caching, and overall performance.

Our plugins

Try TeamUpdraft’s full suite of WordPress plugins.

  • UpdraftPlus

    Back up, restore and migrate your WordPress website with UpdraftPlus

  • WP-Optimize

    Speed up and optimize your WordPress website. Cache your site, clean the database and compress images

  • UpdraftCentral

    Centrally manage all your WordPress websites’ plugins, updates, backups, users, pages and posts from one location