There may be times when you want to reset your WordPress site back to a default state, essentially starting over with a fresh installation. This guide outlines the recommended approach and alternative methods for resetting your site hosted on Pressable.
The Easiest Method: Delete and Recreate
For most users, the simplest and cleanest approach is deleting your current site and then creating a fresh one. This ensures you start with a completely clean installation without any remnants of previous configurations.
- Follow our guide on How to Delete a WordPress Site from Pressable.
- Once the site is deleted, you can immediately create a new WordPress site in its place.
Worried about losing your staging URL? Don’t be. Once a site is permanently deleted, its associated staging URL (*.mystagingwebsite.com) becomes available again and can be used for your new site if needed.
When Resetting an Existing Site Makes Sense
While deleting and recreating is usually best, there are specific scenarios where resetting the existing site might be preferable:
- Custom Plans: If your site is on a custom plan with specific resource allocations (like extra PHP workers or increased storage limits) that you need to retain, resetting the existing site preserves these plan settings.
- API/Service Connections: If you have external services, applications, or API connections configured using the existing site’s unique database credentials, resetting the site allows you to keep these credentials intact, avoiding reconfiguration.
- Re-migration Complexity: In certain edge cases, particularly involving re-migrations or complex setups, resetting the existing site container might be simpler or necessary compared to migrating content into a brand new site instance. This could be due to specific configurations or dependencies tied to the existing site.
Options for Resetting the Database of an Existing Site
If you’ve determined that resetting your current site is the right approach, the first step is usually resetting the database. This removes content, settings, users (except the default admin), etc., returning your database to a fresh WordPress installation state.
IMPORTANT: Before attempting any reset process on a live site, always create a backup of your site first.
Common methods for database resets include:
- WordPress Reset Plugins (Beginner-Friendly): Tools like WP Reset (and similar plugins) can revert your site’s database to its default settings. Carefully review the plugin’s options to ensure it performs the level of reset you require. Note: Some reset plugins also offer options to clean up files (see next section).
- WP-CLI (Advanced): For users comfortable with the command line, WP-CLI offers powerful commands:
wp db reset: Drops all database tables and recreates them based on a default WordPress installation. By default, it requires confirmation, but you can bypass this with the--yesflag.
wp site empty: Empties a site’s posts, comments, terms, etc. (useful for multisite, but can be used on single sites too).- You can use the
--uploadsflag to also delete the contents of the wp-content/uploads directory and the--yesflag to skip the confirmation prompt.
- You can use the
Options for Resetting the Filesystem of an Existing Site
After resetting your database, your site will still contain custom themes, plugins, and media uploads (unless you used the --uploads flag with wp site empty). If you want a completely fresh start without deleting and recreating the site container, you’ll also need to clean up the filesystem.
CAUTION: The following operations permanently delete files. Proceed with extreme care, especially when using command-line tools.
Methods for removing files include:
- SFTP: Connect to your site using SFTP and manually delete unwanted themes (wp-content/themes/), plugins (wp-content/plugins/), and uploads (wp-content/uploads/).
- Caution: While WordPress core files are generally protected via symlinks on Pressable, be very careful not to delete the
wp-config.phpfile located in your site’s root directory (/htdocs). Deleting this file will break your site.
- Caution: While WordPress core files are generally protected via symlinks on Pressable, be very careful not to delete the
- SSH (Advanced): Connect via SSH and use command-line tools like
rmto delete specific files or directories (e.g.,rm -rf wp-content/uploads/*to remove all uploads).- Caution: Use
rmcommands with extreme care, as deletions are permanent. As with SFTP, avoid deleting the crucialwp-config.phpfile in the site root (/htdocs).
- Caution: Use
- Reset Plugins (File Options): As mentioned earlier, some comprehensive reset plugins (like WP Reset Pro) include options to delete themes, plugins, the uploads folder, or other files/folders within
wp-contentas part of their reset process. Check the specific plugin’s documentation for its capabilities.
Summary
In summary, while resetting an existing site’s database and filesystem is possible for specific use cases, deleting the site and creating a fresh one is the recommended and most thorough approach for most users seeking a default WordPress environment on Pressable.