Website hygiene with WordPress

Published: 26 July, 2022 | Category: WordPress Help

This article is aimed at experienced users of WordPress. It will also help people who have taken over a website that was previously managed by someone else.

What is website hygiene?

It is the name I give to the practice of removing material your site is not using. You’ll be amazed how many images, pages and posts hang around long after they have outlived their usefulness!

Although hygiene is not essential to keep the site functioning, there are two good reasons for practising it:

  • It lightens your website’s digital footprint. Websites occupy space in the digital world and some hosts offer cheaper packages for smaller, leaner sites.
  • It makes the admin end easier to navigate. Lots of unused images or draft pages can cause confusion when you’re working on the site.

Website hygiene is especially relevant to complex websites that are managed by several amins. Ideally, an organisation should identify one person whose job is to go through material and make sure all of it is still relevant.

Remove unused or duplicate Images

If you delete a post or page from the website, its associated images remain in the Media Library and have to be removed as a separate step. Be careful that the same images are not being used elswhere. Likewise, remove duplicates if they you uploaded them by mistake.

Duplicates are the result of the same image being loaded twice, either because the person who needs an uploaded image can’t find it, or because they think the first upload didn’t work — sometimes you have to refresh the dashboard page for an image to appear in the library.

WordPress distinguishes duplicates from the originals by adding extra numbers to the filename. So if the original is called my-image.jpg, the duplicate will be renamed my-image-1.jpg. You can check this by clicking on the image to reveal its attachment details and looking in the box labelled File URL (scroll to the right inside the box). Use either one on the website and remove the other.

Image attachment details

There are ways of finding out whether an image is in use on the website. Obviously, you should have a good look at the front end and see if you can find it. If not, go to the Media Library, click in the options box that says All Media Items and choose Unattached. This is a crude technique that will correctly identify unattached images but it will also list some that are in use. Some may be featured images, or be hard-coded by your theme designer as logos or other essential graphics. So be careful what you delete.

As a rule of thumb, if you are about to delete a post or page, make a mental note of the associated images and search visually for them in the Unattached list.

Unattached images in media library

There are plugins that refine the process of listing unattached images but they are still to be used with caution.

Delete dead-end pages

The rule here is to remove all pages that are not linked to from anywhere on the site. Checking this is easier said than done because not all pages have a link from the main navigation. There may be a top-level page where complex information is broken up into several sub-pages, all linked back to the original.

In the Pages list on the Dashboard, go through each page and make sure you can identify where it fits in with the the scheme of the site. If you can’t, does it look as relevant? Who wrote it, and how long ago? Is that person still with the organisation?

Don’t keep draft pages any longer than needed: either delete or, if they are ready, publish.

Draft page: remove or publish

The Author column shows who wrote the page.

To delete a page from the list of Pages, hover over its title and click “Bin” or “Trash” (depending on UK or US English). It will be moved to the bin and should be deleted once again from there (a “binned” page can be restored before that stage). Check what images appear on that page and delete them if they are not used elsewhere.

Old blog posts

Old events that are not longer relevant can linger in the list of blog posts, alongside out-of-date instructions for technologies that have moved on. Too many writers don’t remove items that are 10 or 15 years out of date: don’t become one of those! If you have personal reasons for wishing to keep old material, find ways of archiving it without leaving it on the open internet.

With draft posts, same rule as for pages: remove or publish as appropriate. Delete in the same way as pages, checking the images first, and remove permanently from the Bin or Trash.

Former users and login holders

If your site has many users, check that they still have a right to logins. Have they left the organisation, or changed role? Do they still contribute to the website? Each user represents a security risk, so remove any you don’t recognise. If they are legimate they will soon let you know! You can reinstate them by creating new logins for them.

Users section in WordPress

Removing a user is as simple as clicking on the list of users, hovering over the one to be removed, and clicking Delete. The system will then ask you what to do with the material they created: delete it or attribute to yourself or another user. What you do here obviouly depends on what the material is. To see what a user has contributed, go to the lists of Posts and Pages and filter by author.


Hygiene is part of good website management and should be allocated a regular diaried slot in your schedule. It also provides an opportunity to check everything is up to date: have any contact details changed? Are events still as advertised?

It is also another way of telling the search engines that your website is being cared for, and therefore still relevant to its niche.


Category: WordPress Help

← Previous post: WordPress Image Galleries