How to Archive Content
There are a variety of ways to archive content.
From the Posts screen
The Posts screen displays content in a table format, with each post as a row in the table.
From this screen a user can modify each entry with Row Actions, in the Post Editor, or with Bulk Actions. See more about these actions here.

Archived Post Status provides options in the posts screen for core content types post and page, as well as all public custom post types. See Extending the Plugin for how to modify this behavior.
Archive via Inline Action
When a user mouses over or focuses on an entry in the table, a list of links displays "inline" actions. Published entries will have an link to "Archive" the content.
From the Edit Screen, hover over the post's row
Click on the "Archive" link

If the user has the permissions to view archived content, the "View" link will also appear in the inline actions.
By default archived content is only viewable for users with the read_private_posts capability (Typically Editor roles and higher)
Bulk Archive
To Bulk Edit published content:
Navigate to edit screen.
Select the published entries to be archived.
From the "Bulk actions" dropdown, select "Archive."
Click "Apply"

Note on Quick Edit
Prior to version 0.4.0 this plugin supported changing the post status in the "Quick Edit" via the status dropdown.
In version 0.4.0 this functionality was replaced with the inline and bulk actions above, to better align with how WordPress core handles post-published statuses like Trash.
In the Post Editor
Block Editor
From the block editor, navigate to the Post Settings tab.
Click the "Archive" button in the Summary panel.

Classic Editor
Form the classic editor view.
Locate and click the "Publish" box, click "Archive."

With a function
Always check that a plugin function exists, in case the plugin is ever deactivated.
Content can be archived in a plugin or theme using the aps_archive_post function:
Parameters
$post_id int optional
Post ID. Default is the ID of the global $post
Return
WP_Post | false Post data on success, false on failure.
Example
With WP CLI
Be sure the plugin is active before attempting to use the commands: Activate the plugin with this command: wp plugin activate archived-post-status
As of version 0.4.0, CLI commands similar to wp post delete (source) are available to archive content.
Options
<id>...
One or more IDs of posts to archive
[--force]
Only supported public post types with core non-trashed statuses can be archived. Use this flag to skip current status check.
[--defer-term-counting]
Recalculate term count in batch, for a performance boost.
Examples
Note: Archiving more than 20 posts with the CLI command will output a progress bar instead of a success message.
Last updated