There are many reasons why you may want to remove data in bulk from a WordPress site. For instance, say you're working with FeedWordPress and you need to remove a list of posts that were brought in by mistake. Or perhaps your blog was hacked and you need to remove unwanted users. This guide will walk you through methods for bulk deleting data as well as what to consider before you start.
Before you delete
While working through a bulk deletion project, it will be important consider taking a backup of the site before any real work begins. This will help prevent accidental data loss while working. You can take a full cPanel backup, backups through Installatron, or through the Application itself. Reference the following guides as needed:
- Generating a Full cPanel Backup
- Installatron Automated Backups and Restore
- Migrating a WordPress Site Using UpdraftPlus
- Restoring a Full cPanel Account Using JetBackup
- Understanding Backups on Reclaim Cloud
Bulk Deletion via WP Dashboard
Within the list of Posts and Pages on a WordPress site, there is an option to select the entries you would like to delete.
However, WordPress only defaults the selection to 20 per page. This can take a long time to process if you're working with a large number of posts or pages. To work around this, navigate to the top right-hand corner of your window and click Screen Options.
On the drop-down, you'll see options to customize the Columns, Pagination, and View mode of your WP Dashboard.
Under the Pagination section, you can adjust the number of entries that appear on your screen (up to 999). Click Apply to save the changes and give the page a refresh. Then you can select all the entries you want to delete!
Bulk Deletion via Plugin
The alternative route for bulk deletion would be to use a plugin like Bulk Delete or WP Bulk Delete. These types of plugins will provide more filters as you're determining what you want to delete. For example, the Bulk Delete plugin will allow you to select pages or posts by category, tag, and even users.
^screenshot of the Bulk Delete sidebar settings
^screenshot of the Bulk Delete filterable settings
Using a plugin may be the preferred route when working with hundreds of spam posts or pages. While bulk deleting data via the WordPress dashboard is always a viable option, it may take more time to manage depending on the scale of the project.