In the 16 years I’ve been working with WordPress websites I’ve seen a lot of weird stuff. One thing I see regularly and to this day is unnecessary files clogging up and slowing down websites. A lot of the time people who administer or own websites don’t see the back-end files. But developers do so you end up knowing what to look for.
Let’s get started with why you don’t want excess files on your site, here is a small list of reasons:
- If there are files you don’t know about they could turn into security concerns down the road.
- Clogged up servers can cost you more money in hosting fees.
- Full servers can run slower. Slower server means slower websites and slower websites mean higher bounce rate, less engagement and less conversion and sales.
- Larger sites are harder to manage. Every time you do a backup or a restore, or you want to create a staging site or you want to download the site, you will be downloading excess files. I’ve seen sites that should be in the hundreds of megs that are in the hundreds of gigs due to excess files!
- If any of the larger files are part of the front end website, they will drastically slow the site down. For example I’ve seen images that should be about 200k but are actually 20 meg. That’s 100X bigger and will slow the page down by that margin. You’d never know that looking at it, but for whatever reason someone at one point uploaded a huge image and it’s been on the site ever since.
- Larger image files also use more bandwidth so that can mean slower to work on the site and more expensive hosting fees.
- Larger files put more unnecessary load on the server. That increases the risk of something going wrong. Lean and clean is the way to go.
- If the excess size of files are impacting the performance of the site, that will start to impact search engine results. Google is obsessed with speed, any performance reduction will show up in where they rank you.
- Having a lower site is a bad user experience and it doesn’t reflect well on your brand.
So what can you do about it? Here are a few ideas.
Ditch backup plugins
One of the biggest culprits here are WordPress backup plugins like BackupBuddy or Updraft. The first thing to do if you use these is set up a decent backup regime on your server and remove the WordPress backup plugin and all the files and folders it creates. Or better still use a managed host that does all of this for you.
Related: How to Avoid WordPress Update Anxiety With an Updates Process
Related: The benefits of managed WordPress hosting providers like Cloudways
You would be surprised how big of a problem this can become. Consider if your site is 10 gig and you have a backup plugging backing the site up daily and retaining 10 copies, your site is now all of a sudden 100 gig. And if your server is doing backups of the whole server or whole site, the server is now backing up 100 gig instead of 10, so the space on the server is now at least 200 gig (assuming it only keeps one day’s worth). This is a very common scenario!
Eyeball the WordPress folders
I like to have a look at the web server folders in an FTP client like FileZilla or a host’s File Manager. You see some weird stuff. Look out for zipped up files (could be old backups), or folders that are renamed or have a ‘.’ at the front (developers sometimes do this to manually disable things like plugins). Or if you know WordPress you’ll quickly notice any folders that you know shouldn’t be there. For example the root folder structure in WordPress only has 3 folders. If there are more than 3, you’ll see straight away that something is up. Obviously you have to be careful and know what you are doing before you start removing things.
Look specifically at image sizes
Larger than necessary images is a very common problem. To the naked eye a 200kb image may look exactly the same as a 20 meg image, but one is 100X larger. I like to aim to keep images under a few hundred k so if you navigate the WordPress folders and see lots of images bigger than this, you know you have a problem. A good thing to do is download the site files, navigate locally on your computer and sort the wp-content/uploads folder by file size. You’ll quickly see if there are images in there that are unnecessarily big.
You can then use something like https://imagecompressor.com/ to batch compress them and replace them on the server. Another useful tool is Disk Inventory X. It’s an ugly looking thing, but it’s super handy as it shows you immediately what files or folders are taking up space in your site.
Consider older pages or products
Quite often files will be up there for products or page that no longer exist. This is a bit of a tricky one because it’s hard to know by looking at the folders, whether or not an image is actually used on the site. One good thing is WordPress stores media files by their year and month so if you know for example that you don’t have any pages or products from before a certain year that are still published, you may be able to safely remove those folders. This is pretty risk however, so you’d want to be absolutely certain you don’t need them.
Less plugins and themes
Less plugins is an absolute no brainer way to reduce the bloat on your site. All plugins add extra files to the folder structure, extra tables to the database and extra data to those tables. I’m always pretty careful when installing plugins, because they are often there forever, so only install ones you really need. Another good idea is to completely delete plugins as opposed to just deactivating them. If you are sure you will never use them again, do a full delete and the files will be deleted from the server.
Caching / CDNs / Lazy loading / Minifying etc
There are bunch of techniques you can employ to speed a site up including caching, using a CDN (like Cloudflare), Lazy Loading, Minifying scripts etc. These don’t reduce the size of the files on your server, but they will speed your site up. It’s a good idea to use these but not in place of a good tidy up of the files first.
Don’t do non website things on the website
Keep the website as your publicy-facing front for your customers. Any other features that your customers don’t need to see, you can do elsewhere. For example I wouldn’t’ install an email marketing tool in WordPress, I would use an external service like MailChimp or ActiveCampaign. I wouldn’t use your website as a secure area for staff. You can set up an intranet for that. Keep anything unnecessary off your website and the overall bloat will be less.
That’s a bit of a starting point, hopefully those tips are useful.
If you are an Australian business who wants help with WordPress check out our plans here. If you are interested in more content like this, check out the rest of the WP Master blog.
Photo by Mathew Schwartz on Unsplash
- A simple guide to WordPress SEO - May 25, 2023
- Common WordPress Errors and How to Fix Them - May 25, 2023
- What To Do If Your WordPress Website Is Down - May 25, 2023