Reinstalling WordPress is a common task that many site owners dread. But it doesn‘t have to be scary! Let‘s walk through how to easily uninstall and reinstall WordPress step-by-step.
After 15 years as a WordPress developer, I‘ve been through the process many times. Trust me, if you follow these best practices, you‘ll avoid headaches and can refresh your site in no time.
Before we touch anything, it‘s absolutely vital to back up your entire site. Over [fact/stat on WordPress usage] WordPress sites and counting are built every day. Imagine if you lost all your hard work!
I recommend using a comprehensive backup plugin like UpdraftPlus. It creates complete backups of your:
- Database
- WordPress core files
- Plugins & themes
- Media uploads
Store the backup archive on an external drive and cloud storage for redundancy. It takes a little extra effort up front, but having a backup saves you from disaster down the road.
The database contains all your site‘s content – posts, pages, comments, navigation menus, etc. To preserve this, we‘ll export it to an XML file.
Go to Tools > Export in your dashboard. Select the All Content checkbox and click Download Export File. This exports your posts, comments, custom fields and more into an XML file.
Save this export file to your computer. When we reinstall WordPress, it will allow us to import the content.
Take inventory of the plugins and themes you currently have installed. We‘ll need the exact files later to reinstall them.
For plugins, download the latest ZIP file for each one from wordpress.org or the developer‘s site.
For themes, make a note of any custom child themes you use. Download the child theme folder from your current /wp-content/themes/ directory.
Having these handy makes re-configuring your site much quicker.
Here‘s a step many folks forget…Your media library – images, docs, PDFs, etc – lives in the /wp-content/uploads/ folder.
Download this entire folder to your local computer. Then when we reinstall WordPress, you can reupload it to restore your media. No one likes broken images all over their site!
Phew, now we‘re backed up and prepped. Time for the big guns…uninstalling WordPress.
You have two options to uninstall WordPress:
-
Delete all files via FTP except
/wp-content/. This removes WordPress but leaves your content intact. -
Some hosts have an auto WordPress uninstaller in the control panel. Use this first if available.
Once uninstalled, your site will have a blank slate, ready for a fresh WordPress installation.
Let‘s put WordPress back on your site. Download the latest WordPress ZIP file from WordPress.org.
Extract the files, and upload the /wp-files/ folder via FTP to your server.
Run the installer like normal, creating your database and user account. I don‘t recommend reusing the old one – safer to start fresh.
Now we can reinstate your plugins, themes, and media. Login to the new WordPress install‘s /wp-admin/ area.
Go to Plugins > Add New. Upload each plugin ZIP file you downloaded earlier. The plugins will install just as they were before.
For themes, upload your theme folder to /wp-content/themes/ via FTP. Any child theme files also need uploaded.
Lastly, upload your /wp-content/uploads/ folder via FTP. This restores your media library so images are no longer broken.
The final step is getting back all those blog posts, pages, comments, etc.
Go to Tools > Import in the dashboard. Install the WordPress Importer plugin.
Run the importer. Upload the XML file you exported earlier and import it. This will reconstruct your content in the new database.
Phew, we‘re done! With a systematic approach it‘s easy to cleanly reinstall WordPress. Follow these 7 steps, and you‘ll be back up and running with a refreshed site.
I know the process seems intimidating, but take it from me – if you back up properly and reinstall plugins/themes/content, it goes smoothly. Let me know if you have any other reinstallation questions!
