Are you getting a pesky error message that is hard to fix, trying to recover from damage caused by a hacker, or just want a fresh start in WordPress? Then you may want to uninstall and reinstall WordPress. This should definitely be the last thing you try if you are having errors because there are many guides to fix specific errors.
This will completely reset your WordPress and is not recommended unless you have no other option. If you are just starting out and have made a critical mistake it won’t be as devastating, but if you have run your website for years you should definitely seek other fixes. Today I will demonstrate how to uninstall and reinstall WordPress.
Why and When to Reinstall WordPress
Uninstalling and reinstalling is a complete reset of your WordPress and will fix any errors you are getting and restore all of your settings to default. It should only be used as a last resort but will get WordPress working again. A better option is restoring a backup of your website from when everything was working, or follow tutorials that specifically walk you through fixing the error you’re receiving.
Now if you are just starting out your website this is probably a better solution. Odds are you’re trying to see what every setting you can change does and this can definitely lead to errors on your website if you don’t know what you’re doing. This solution can easily repair your website and might even offer you a valuable lesson when it’s done.
How to Uninstall and Reinstall WordPress
Today I will demonstrate how to uninstall and reinstall WordPress. It is a simple process, but since you will be touching the core WordPress files you should create a backup for your website using any of the backup plugins. Remember you will need to manually reinstall your plugins so try writing them down so you can quickly get your site back to the desired way.
You will need access to your cPanel before starting this tutorial. How you access your cPanel is different depending on web hosting plans. The cPanel itself will also look different. For reference, I am using the cPanel provided by having a GreenGeeks account.
The first thing you need to do is export your WordPress content. This will save all of your page, blog, and media content on your website. If any of this was placed using a particular plugin, make sure you install that plugin first before importing the files. On the left-hand admin panel click on Tools and select the Export option.
Select all of the content you want to save. By default, the All Content option should be selected. Click on the “Download Export File” button when you have selected your content.
You will now want to access your cPanel. Once inside the cPanel click on the File Manager option.
Search for the folder named wp-content. You will want to right-click it and copy or download it to your computer. This file is essential because it stores all of your custom WordPress content. Remember, if you are manually entering the name of the file to find it then you must use the proper letter case and its location is dependent on your web host.
Go back to the dashboard and select the MySQL Databases option. You’re going to need a new database for the reinstalled WordPress. This will ensure a fresh start. By doing this you will not need to delete your old database since all of your new information will run through the new one.
Create a new database by naming the database and click on the “Create Database” button.
You’re also going to need to create a new user and add it to your new database. Simply scroll down and fill out the information fields these sections.
Now it is time to purge all of your WordPress files and folders. Select all of your WordPress files, they should all start with wp, and delete them. This will uninstall WordPress from your cPanel.
You’re now going to want to reinstall WordPress the same way you did originally. There should be a direct download option on your cPanel. Click on the WordPress option.
Click on the “Install Now” button.
Fill out the information fields as you did the first time when you set up your website. Click the “Install” button at the bottom when you are done.
You should now have WordPress installed. Make sure all of your reinstalled websites data is going to the new database you created before. It is now time to start restoring some of the content of your website. The wp-content file that was copied before can now be used to upload all of your media back to your website. Simply upload or paste the file information where the files are kept. In particular, the themes and uploads sub-folders should be uploaded into your new wp-content folder.
You now want to visit your website. It will not have any of the pages and content it previously possessed. It is time to import the data we secured at the beginning of this tutorial. On the left-hand admin panel click on Tools and select the Import option.
Look for the WordPress option and click on the Run Importer option.
Click on the “Choose File” button and select the file that was exported at the start of this tutorial. Click on the “Upload file and import” button. You will be asked about authors on your website. Select the most appropriate option for your website and click on the “Submit” button.
Congratulations, your website should have all of its content back and free of any error messages or damages caused by hackers. You will still need to redownload all of your plugins individually. There are plenty of great plugins to choose from so make sure your picking what’s best for you.
Keep Your Website Working
Unfortunately, mistakes are made and error messages appear or hackers can damage your website. This can be better dealt with by creating a backup for your website. Uninstalling and reinstalling WordPress should only be used as a last result when your backup has been compromised or if you never made one.
Realistically all error messages have a solution and if you take the time you should have no problems doing so. It can be a daunting task trying to keep your website running correctly, but if all else fails, remember you can always reinstall WordPress to ensure a fix.
Have you made a backup for your website? Why do you think uninstalling and reinstalling WordPress is an option for your website? How many plugins did you need to redownload after reinstalling WordPress?