Archiving pages and posts can be a crucial procedure for long-running WordPress blogs. It preserves them for later reading, whether as source material for future posts and pages or as nostalgia pieces. The latter situation may not necessarily mean that the content is outdated, redundant, or updated, though that’s the frequent reason. Changing the theme, rebranding, configuring elements on the website, or switching the page builder method can all make the current page unsuitable for the public. Finally, you may want to treat users to some website history. With that said, let’s dig into how to archive a page in WordPress.
1. Archive a page using a WordPress plugin
If you need something similar to a collection of posts that are no longer relevant, you can archive them without deleting them. However, there are no built-in ways to do so. Therefore, unless you’re adept with coding, which we covered next, the easiest solution is to install a WordPress plugin. We are unaffiliated with either, but we’ll demonstrate two popular options that achieve the same result but work differently. Here are two examples:
1. Use LH Archived Post Status for archiving pages and posts
Start by heading over to the LH Archived Post Status page or look for it in WordPress Admin Section’s plugin repository. Then:
- Install and activate the plugin.
- Visit the Posts → All Posts page or go to Pages → All Pages, depending on what you want to archive.
- Open the page or post, then click the cogwheel button in the top right corner.
- Go to the Post tab, then find the “Status” section.
- Click the drop-down menu, and set as “Published”.
- Switch to Archived.
- Click the Update button in the top right corner. Your page or post will now be archived, i.e., only visible on the back end, and no longer publicly. Additionally, you’ll have an easy way to distinguish them because the plugin adds an “Archived (X)” option in the top bar that, after clicking, filters all posts or pages marked as such.
Note. You can always make the page public again by switching the status to “Published”. Additionally, you can put checkmarks in empty boxes in front of page names to archive them in bulk. Click on Bulk actions → Edit afterward, then change the status to Archived on the right-hand side before clicking Update.
2. Employ the Edit Flow WordPress plugin
We understand some users want to configure their Archived status to fit their unique needs. Sadly, the plugin above is not designed for that purpose. However, there’s one named Edit Flow for WordPress, that can. Though the base plugin is outdated at the time of publication, Automattic, the owners of WordPress, contributed to the code. Additionally, the plugin still works (with minor issues, like lack of some notifications) and even on multisite configurations. That’s because it was designed to be expanded not by editing code but through code snippets. Most importantly, an active user base can help with coding and troubleshooting.
Using Edit Flow to configure a custom Archive status
With that said, here’s how to configure Edit Flow to archive pages in WordPress:
- Enable the plugin, then go to the Edit Flow option in the left sidebar of the WordPress Admin dashboard.
- Click the Edit Flow option below.
- Unless you need them, disable all modules except Custom Statuses.
- Click the Edit Statues button.
- Double-check that the Draft is the default option (Put the cursor over Draft then select Make Default).
- Erase all other custom statuses except “Draft” by hovering and selecting Delete.
- Click on Add new, then select “Archived” as the post type. Go to Options and choose “Pages” as the type of post you want to be able to archive.
- Save changes, then head to Pages → All Pages again. Open a page you want to archive, then under “Status”, pick Archived again.
- Click on Update and your post won’t be available publicly.
The only problem with this method is that an archived page will still be visible in menus, regardless of the status (draft, published, pending review, and so on). That’s because WordPress ignores this setting, which forces you to double-check your menus for links to your page every time you archive one. To ease your worry, we propose creating a site-specific plugin, using a code snippet plugin, or adding this code into the functions.php file inside your theme’s files.
function remove_archived_from_menu($post) {
_wp_delete_post_menu_item($post->ID);
}
add_action( ‘publish_to_archived’, ‘remove_archived_from_menu’);
This will activate whenever the post adjusts its status, and whenever you switch from published to archived, delete the menu item that contains that post ID.
2. Configure a custom post type for WordPress
If you aren’t a fan of plugins or desire additional customization options, it may be better to create a custom post type in WordPress, and name it “Archived”. Configure what it should include and ensure that the page type won’t appear on the front end. We feel like this is unnecessary unless you need archived pages to be complex, design a custom appearance for archived pages, or must avoid the use of plugins.
3. Duplicate a page in WordPress to archive it
Have you followed our guide for duplicating posts or pages in WordPress? If so, there’s no need to tack on another plugin when the functionality is there. It also works if you want to save archived posts under a separate section website section invisible to the public, or even to a secondary website. However, unless you delete the originals, it’s unsuitable for websites that need to archive lots of posts.
4. Hide a page in WordPress
We realize that some website owners want to stop search engines from indexing their pages, but keep them visible to their visitors. Bloggers commonly request this option when content is no longer relevant, yet has value for their followers. Luckily, there are several nifty ways to hide a page in WordPress. The only downside is the difficulty distinguishing archived posts from other published pages. Thus, you would need to edit those pages or alter the design to make it clear to visitors that the page is archived.