Skip to main content
All CollectionsWordPress
How To Uninstall And Reinstall WordPress
How To Uninstall And Reinstall WordPress
Jamie G. avatar
Written by Jamie G.
Updated over a week ago

WordPress is a powerful and efficient content management system (CMS) that many of our customers take advantage of, however, it’s not above causing trouble. Sometimes when WordPress causes errors such as locking MYSQL tables, the best course of action is to uninstall and reinstall the software. This is completely possible without losing any of your data or any of your search engine optimization (SEO) gains.

Before we get started on how to uninstall and reinstall WordPress, keep in mind this is not a first-line option.

The most common WordPress errors are easily fixable and each problem should be individually assessed to determine the best course of action. Often, our Heroic Support Team can quickly assist you without taking such a drastic measure. However, if the problem cannot be fixed, we’re here to guide you through what it takes for “Plan B.”

The first thing you need to do is create a backup of your WordPress database. There are plugins that will automatically take a backup for you, at which point you can store them locally on your computer or on a cloud storage service like Google Drive or Dropbox.

After you’ve successfully backed up your WordPress database, you need to export your WordPress content by creating a WordPress export file. This file will contain everything including your posts, pages, categories, tag and even comments. This will also leave out data created by WordPress plugins, which can be problematic and depending on the developer, can create a lot of issues.

How to export WordPress content

1) Sign in to your WordPress admin area and then go to Tools » Export page.

2) Select all content and then click on ‘Download Export File’ button.

Heroic tip: If your website utilizes a lot of registered users it might be a good idea to go ahead and export them as well.

How to download WordPress content to your computer

All of your WordPress data including WordPress themes, plugins, images and uploads are stored in the /wp-content/ folder on your website. You need to backup this invaluable data to your computer and/or cloud so you can use it later when we reinstall WordPress.

To do this, connect to your WordPress site using an FTP client or File Manager in cPanel. Once connected, select the wp-content folder and download it to your computer.

Once complete, you are ready to uninstall WordPress.

How to uninstall WordPress

To uninstall WordPress, connect to your WordPress site using a FTP client or File Manager in cPanel. Once connected, it’s time to delete all WordPress files (scary, I know, but remember we’ve backed everything up!)

You don’t really need to delete your WordPress database. Here at Name Hero we allow you to create as many databases and usernames as you need. Instead of deleting the existing database, you can create a new one with a new username and password.

To create new database, login to your cPanel account and click on MySQL Databases icon.

Once clicked, you’ll arrive at the add new database page. Enter a name for your new database and click the create database button.

Once complete, scroll down to add ‘MySQL Users’ section and add a new user. Enter a username and password and click on ‘Create User’ button.

Add the user to the database we created earlier. To do this, simply scroll down to ‘Add user to database’ section and then select the username and database you created.

Click “Add” to continue. Now your database is ready for a fresh install of the WordPress CMS, which we’ll use to reimport your data.

How to install WordPress

Go get your new (free!) copy of WordPress, navigate to WordPress.org/downloadand click the download button.

Once you have downloaded WordPress, unzip it. This will unpack the WordPress folder, which you can open and see all the WordPress file. Connect to your FTP client to upload this entire folder.

After you’ve uploaded the WordPress folder, go ahead and visit your website. WordPress will ask you to enter your database information.

Use the information we set up earlier with the host information being localhost. Once you’ve filled out your information, click “Submit” to continue. WordPress will automatically connect to the newly created database and deliver a success message once it has done so. Click on the “Run the install” button to continue.

WordPress then needs you to provide your site information like site title, description, admin email address and password.

After filling out the fields, click “Install WordPress” and the system will automatically finish the installation process. Log into the WordPress admin area with the credentials you entered earlier.

Now we have to delete the default content, which can easily be accomplished by going to posts and clicking to delete the pesky “Hello World” post. Visit the ‘Comments’ section and delete the default comment. Lastly, go to Pages and delete the sample page.

We now have a fresh install of WordPress without any data. Let’s import what we backed up earlier and get your website back up and running!

How to restore backup data in WordPress

Our objective in this step is to restore your uploads, images and theme located inside the wp-content folder we downloaded earlier. To accomplish this, connect to your website with an FTP client and go to the /wp-content/ folder. Select the /wp-content/uploads/ folder from your computer or cloud and upload it to your website.

Heroic tip: Don’t forget about theme edits! If you have made changes to your WordPress theme or child theme files, then you can upload them now. Your theme folders are located in the /wp-content/themes/ folder.

How to import content into WordPress

Time to import all of your posts, pages, categories, tags and any other content included in your old WordPress install! To accomplish this, go to the Tools » Import page and then click on “Install Now” link under WordPress.

WordPress will download and install the WordPress importer. After it’s finished, click on the “Run Importer” link. This will bring you to WordPress importer page where you will need to click on the “Choose File” button and then select the XML file you downloaded earlier.

Click on the “Upload file and import” button to continue. WordPress will ask if you want to create new authors and assign the posts to them or if you would like to assign all posts to your current user account.

If there is only one WordPress author (i.e. yourself), then you can assign all posts to yourself.

Otherwise, do nothing and WordPress will import the authors. Don’t forget to check the box under “Import Attachments,” which will allow WordPress to properly import the images in your /wp-content/uploads/ folder to the WordPress media library.

Click “Submit” and WordPress will begin importing content from the XML file into your fresh WordPress install. Once complete, you’ll see all of the content simply by visiting your website.

How to install WordPress plugins

The only thing left to do is to re-install the plugins from your old WordPress site. This has to be accomplished on a plugin by plugin bases (i.e. individually) after which you’ll need to activate. Don’t forget the previous settings you used as you may need to manually reapply any changes you made.

Once this is complete, you’re back up and running! Navigate your website to make sure everything is functioning the way you want it to function. Obviously, if something is not behaving properly, you can go back into the WordPress administrator area and tweak them.

Did this answer your question?