Search
Close this search box.

Archiving Posts in WordPress – WPQuickies

How do you archive WordPress content you don’t want to make public anymore but can’t bring yourself to delete completely?

Why May We Want To Archive a Post?

Not all content is evergreen, meaning it may not apply to some people all the time.

This is true for time-based content, and reviews for defunct products or services.

Or simply you are performing a review of your old content to see if it is still relevant.

You have old blog posts on your WordPress website that aren’t getting any traction.  In fact, they are so old that they aren’t particularly relevant to the services that you now provide.

But, you just can’t bring yourself to delete them from existence.  Maybe they can be repurposed at some point.

The idea of archiving the content pops into your head but WordPress doesn’t have a native archive feature.

In fact, WordPress muddies the archive term, using the word archive to mean a chronological collection of your content.

WordPress Post Status

WordPress posts have a status attribute that controls the public visibility of the post.

A WordPress post status can be set to any of the following 8 default options:

  • Publish – Viewable by everyone (public)
  • Future – Scheduled to be published at a future date (not yet public)
  • Draft – Incomplete post viewable by anyone with proper user role (not public).
  • Pending – Awaiting a user with the publish_posts capability (Editors) to publish (not public). 
  • Private – Viewable only to the post author or Administrators (not public).
  • Trash – Pending deletion (not public).
  • Auto-Draft – Auto-saved revisions (not public).
  • Inherit – A child post (attachment or revision) using status from the parent post (not public).

Out of the eight post status options, only “Publish” allows the post to be publicly viewed.

In the block editor, you control the post status from the Post > Status & visibility settings on the RHS column.

Click on the visibility setting to change the status.

While the post is in the draft mode you can check the “Pending review” checkbox to set the status to pending.

You can unpublish any published post by clicking on the “Switch to draft” option at the top RHS of the post editor.

The post status is stored in the _posts database table.

What Do We Mean By Archiving a Post?

Let’s establish what we are trying to accomplish when discussing archiving post content.

  1. Don’t delete the content entirely.
  2. Keep the content available in the administration dashboard of the CRM.
  3. Remove the content from the public-facing site.

Solution 1: Change Post Status

You could change the status of the published post to draft, pending or private, which would keep the content in the CMS and stop it from showing publicly.  

Maybe many people do that. After all, the only other WordPress core option is to delete the post.

This option will work, but it’s a messy workaround, especially if you use the post status in an editorial context like it’s meant to be used.

Using this method, you’re mixing old and future new content, which will get messy quickly.

Solution 2: Add Another Post Status

The plugin LH Archived Post Status does a pretty good job of adding an archived post status and hiding your content from the main query loops on the front-end of your site.

The editor UI has been replaced with a simple dropdown menu containing the available post status and the new one “Archived”.

WordPress post archived status

You can easily filter and find archived posts from the posts dashboard.

Find WordPress archived posts in the dashboard

The only issue I had with this plugin is that it displays archived posts in the WordPress site search.

I’ve issued a fix for that with the plugin developer.

What Happens To Media Files Of Archived Posts?

Nothing. 

Media Library content is only associated with your posts by their post ID and is not archived.

You will have to deal with related media files separately.

Archiving Posts and SEO

Archiving WordPress posts removes the post content entirely from the public-facing part of your website.  

This also means that Google will no longer be able to index that link and will classify it as missing.

You may want to ensure that you don’t link out to any other site content or have links from other content on your website to the post you are archiving.

If either is true, you will want to set up a 302 redirection. Otherwise, the broken links will show up as 404 errors in Google indexing and having too many 404 errors can negatively impact your SEO results.

Summary

Unfortunately, there is no WordPress core post status called “Archive” that will remove a post entirely from the public-facing part of your website while keeping the content in the CRM admin interface.

One handy plugin comes pretty close, but I feel there could be better support for managing archived post content in WordPress core.

Do you still have questions about archiving WordPress posts?

Ask in the comments below.

#WPQuickies

Join me every Thursday at 1 pm Sydney time for some more WPQuickies – WordPress tips and tricks in thirty minutes or less.

Broadcasting live on YouTube and Facebook.

Suggest a #WPQuickies Topic

If you have a WordPress topic you want to see explained in 30 mins or under, fill out the form below.

https://forms.gle/mMWCNd3L2cyDFBA57

Watch Previous WPQuickies

Was this article helpful?
YesNo

2 Responses

  1. I am trying to “archive” old uploaded file from WordPress so only I as administrator can see them. I don’t want visitors to WordPress to be able to access them by search facility. Can you advise best way to do this – that is to keep only posts but not allow others to be able to find them or access them on site or find them by searching. Thanks!!

    1. Hi Margaret. WordPress doesn’t have built-in archiving for media files. I’m not aware of any plugins that will do that, either. The only real way is to ensure you have a copy of the file on your local machine or cloud storage and delete it from the WordPress media library.