How to Uninstall and Reinstall WordPress for Troubleshooting

Reinstalling WordPress can be a big step to take when you face an issue with your website. If you think of updating, WordPress has a built-in option to do so.

If you get an error, there are many troubleshooting techniques you should use. At last, if you wish to have the fresh installation without losing the data of your site, only then you should think to uninstall and reinstall WordPress.

Sometimes when your website gets hacked, you may need to take some serious steps and make sure the SEO score of your site remains intact.

During the process of WordPress reinstallation, you have to keep the data safe. So, it's vital that youback up the website and its database using cPanel or any plugin.

Many people keep the backup in their web hosting account, which is of no use because if your account gets hacked, it means your backup files also get affected. So, it's necessary to save it on your computer, Google Drive, Dropbox, or anywhere else you like.

In this tutorial, I am going to walk you through a step by step process to delete all the WordPress data, saving the necessary folder, creating a new database, and having a fresh WordPress installation.

1). Export Your Website's Content

This is the first step you need to take to secure the content of your website. This process doesn't include plugins' data; it only contains the content.

Let me show you how you can do this:

Log into your WordPress admin panel and navigate to Tools>>Export, and you and see an option to "Choose what to export," from which, you have to select the "All Content" radio button.

Click on the "Download Export File" button, and the download starts. Depending on the size of the file and your internet speed, you can see an XML file in your computer.

Now that you have successfully secured the content of your site, you should take the next step to back up the design and media files.

2). Back up the wp-content Folder

You should know that WordPress stores themes, plugins, and media files in the wp-content folder. It's vital to download it to maintain the SEO score.

Exporting the data doesn't always contain all media files, so, you have to upload them later. To save the hard work, it's better to do something smart.

To download wp-content, you can either use cPanel or FTP.

Let me show you the steps using cPanel:

Step 1:-

Log into your cPanel account and open the File Manager. I hope you know that all the data of a WordPress website resides inside the file manager.

Step 2:-

From the life hand sidebar, you have to open public_html. If you have only one website, WordPress installation is available in the public_html directory.

If you run multiple websites on the same web hosting account and uninstall and reinstall WordPress for an addon-domain, subdomain, or subdirectory, you have to find the right folder name where WordPress has its data.

Search for the wp-content folder and compress it to make a ZIP file. Right-click and choose "compress."

Step 3:-

A popup appears where you need to select the compression type, select the ZIP radio button and click on Compress File(s).

Once the compression process finishes, refresh the page, and you can see a ZIP file to download.

3). How to Uninstall WordPress Completely?

You're already in the file manager. After backing up wp-content, it's time to delete all files and folder from the root directory.

Click on Select All option from the cPanel's navigation menu, and click on the Delete option from the main menu.

A popup appears you to ask for confirmation because once you delete the content, it's irreversible. Follow the instructions and delete everything.

Once you do so, the first part of installing WordPress is complete.

You may be wondering about the database. Don't be worried; you don't need to delete a database to reinstall WordPress, you can always create a new database and use it.

4). How to Create a New Database?

Nowadays, almost every web hosting company offers a few clicks options to create a new database. Let me show you how:

Step 1:-

Open cPanel and scroll down to the databases section. Click on the MySQL Databases icon.

Step 2:-

On this page, you can see an empty field to create a new database. Fill in the name, and scroll down.

Step 3:-

Now is the time to create a new database user. Fill in the details, and make sure to keep the password strong.

Step 4:-

You need to add the new user you just created to your database.

Once you fill in all the details, you can see a new database at the bottom of the page with other databases. Now that you have created a new database, it's time to install WordPress.

5). How to Reinstall WordPress?

Using an old fashioned way to download the ZIP file from the WordPress' official site is not what I am going to recommend.

Most famous web hosting companies offer one-click WordPress installation. Use that option and install WordPress. Don't worry about any other data because you have already deleted the old WordPress installation.

6). Import the Content to the New WordPress Installation

Log in to your website having a fresh WordPress installation and go to Tools>>Import.

On this new page, you have to install the WordPress importer. Once you do that, the text transforms into "Run Importer".

After that, choose an XML file you exported from your website in the first step, and click on Upload file and import to start the process.

You will be asked to choose the author for the content. If you had multiple authors on your previous WordPress installation, you can create new users and assign the content to them. You can also assign all the content to only one author.

Continue and complete the import process.

7). Restore Themes and Uploads

If you remember, you downloaded wp-content from your old WordPress installation. To complete the reinstalling process, you have to restore "uploads" and "themes" to your new WordPress installation.

Unzip the wp-content backup and extract the folder.

Now if you want to use the same old design, you have to upload the "themes" folder. Uploading the "uploads" folder is important.

If you wish to use FTP, you can simply upload these folders to wp-content. If you use cPanel, first you have to ZIP these two folders in the same file.

Go to file manager>>public_html>>wp-content of your new WordPress installation, and click on the Upload icon from the main navigation menu of cPanel.

A new tab opens up, choose the ZIP file containing "uploads" and themes" folders and start uploading. Once finishes, you have to unzip the file.

NOTE: You will see the themes folder, so you will be asked to replace it.

You have accomplished your goal to uninstall and reinstall WordPress. Now, you may be wondering about plugins.

It's important to know that behind any malicious attack, most of the time, there's a plugin's file. So, it's good to install plugins manually.

I Hope You Find it Easy to Uninstall and Reinstall WordPress

I understand how hard it's when you encounter an error on your WordPress website. Sometimes, all the conventional troubleshooting techniques don't help.

At such point, you may think to uninstall and reinstall WordPress to fix any malicious code injection in any of the core files. To do so, it's vital to secure the content as I explained in the tutorial.

If you use a shared web hosting, most probably you get a cPanel; otherwise, you can always use FTP/SFTP. I hope it's not as hard as you thought in the first place.

How to Solve Pluggable.php File Errors of a WordPress Website

While managing a WordPress website, you may need to add any custom code to enhance its features. Most WordPress users are non-techie, and they don't check code on a local environment before using on their live site.

Such a mistake leads to the occurrence of an error. Seeing a pluggable.php file error is not so common yet many users notice it while making any kind of changes to their site's PHP code.

As we all know, WordPress is a PHP-based Content Management System (CMS) and all of its themes and plugins use PHP as the coding language. Whenever a plugin or theme conflicts, an error occurs, and sometimes it leads to the pluggable.php file error.

Have you seen such an error on your site? Are you still trying to figure out the reasons and solutions? If so, this tutorial is for you.

The main reason for the happening a pluggable.php file error is when a new function isn't able to handle the override of the default WordPress functions.

The pluggable.php is one of the core WordPress files, which means there is something else which is conflicting the natural behavior of this file.

How does pluggable.php File Error Look Like and How to Fix it?

Most of the time, the error consists of a path from which it generates. As I mentioned above, pluggable.php is a core WordPress file and you shouldn't edit it.

So, you have to understand how the error looks like and what it reflects. Let me show you an example:

Warning: Cannot modify header information - headers already sent by (output started at /home/username/yoursite/wp-content/themes/themename/functions.php:1091) in /home/username/yoursite/wp-includes/pluggable.php on line 1280

There is a warning pointing out to line number 1280 in the pluggable.php file. Most people make this mistake and start editing this file.

If you look closely, there is another path which consists of the functions.php file of your WordPress theme. If you added any custom code snippet, you should check it again.

If you installed a new plugin which overrode the current function, try disabling it. It's possible that there is an extra space in the functions.php file.

Most probably, in the closing and ending PHP tags.

For example, you see an extra space in the ending tag like this: php ?>

Let me show you another example of the error.

Warning: Cannot modify header information - headers already sent by (output started at /home/username/yoursite/wp-content/plugins/plugin-name/plugin-file.php:1091) in /home/username/yoursite/wp-includes/pluggable.php on line 1280

If you check out the path mentioning line number 1091, it points out to a plugin, which means you should check the plugin which generates an error.

Not all plugins are well-coded. There are tons of third-party plugins available in the official WordPress plugin repository. And most times, when WordPress core updates, a plugin starts conflicting because of its old coding standards.

It's also possible that the plugin conflicts with any other plugins you use. Even though WordPress plugins are helpful, but sometimes they can be a big issue because of their poor-coded standard.

Where Can You Notice pluggable.php File Error?

I am sure; you're curious to know more about a pluggable.php file error. It's because every error has its location to display its warning message.

A pluggable.php file error can break down the site and you only see the warning message I mentioned above. Depending on the conflicts with the WordPress functions, you may be able to log in to admin dashboard and see the error.

Mostly when you copy and paste any custom code snippet without testing, it causes such a problem. So, it's always good to set up a local environment using XAMPP, WAMP, MAMP, or Local by Flywheel.

Just like the white screen of death, you can see a pluggable.php file error on every page of the site, which means whenever you try to open any page of the site, only a warning message appears.

How does an Error Message Look Like When it Happens Because of a WordPress Theme?

Though many theme developers have started to develop themes using React and other languages, the base remains on PHP because that's what WordPress functions works on.

Just like a plugin, a WordPress theme can also generate a pluggable.php file error. For example, similar to the first error I mentioned above, there may be another error on a different file.

Let me show you how.

Warning: Cannot modify header information - headers already sent by (output started at /home/username/yoursite/wp-content/themes/themename/admin-functions.php:1191) in /home/username/yoursite/wp-includes/pluggable.php on line 1240

As you can see, there is a path to line number 1191, but it's different than the usual warning message you get when you add a custom code snippet in the functions.php file.

It's because there is a different file now. You may be wondering that functions.php is the only file which has WordPress functions.

But you shouldn't ignore that every WordPress developer is different, and some might like to keep functions of a specific section in a different file, which acts as a functions.php file.

For example, functions controlling the built-in custom panel of a theme are present in the admin-functions.php file. So, the error message mentions this file.

What's the Best Way to Fix pluggable.php File error?

Whether it's occurring because of a WordPress theme, plugin, or custom code you copied and pasted, you should never edit files on the live site.

First and the most important step is to backup your WordPress website and its database using cPanel, FTP, or a plugin like UpdraftPlus.

If a theme or a plugin is the culprit, uninstall them and test on a local environment or any other demo site.

If the warning message displays an error path to a functions.php file where you recently added custom code, you should remove it, clear browser cache and try again.

Conclusion

Solving pluggable.php file error is quite easy if you understand the reason behind it. As I mentioned in this article, the main key to find a file which generates the error is checking out the path.

Forget about the path which points you out to the pluggable.php file because you shouldn't edit it. WordPress core files work fine, it's a plugin or theme which conflicts with the core.

How to Use UpdraftPlus to Backup and Restore a WordPress Website?

It's not new to backup your WordPress website. Every time you read a security guide, most WordPress professionals recommend you to backup your site before making any changes.

Of course! It's all about preparing for a hard time. I understand it can be a little bit scary for non-techie users. But what if I told that backing up a site using UpdraftPlus isn't so difficult?

Most WordPress users don't know to code, and that's the first question they ask if they require coding skills to maintain, back up, or update their site. In this article, I am going to answers all of such questions.

There are many guides available on the web where you can learn how to backup a WordPress website using cPanel built-in options or manually. But today, you are going to master UpdraftPlus—a plugin for backing up a WordPress site—at its best.

A Step By Step Process to Backup Your WordPress Site Using UpdraftPlus

Once in a while, every time something new comes up, people refrain themselves from doing that. Well, UpdraftPlus is one of the most reputed plugins people use to back up their site.

Here are some steps you can follow:

Step 1:-

First of all, log in to your WordPress admin panel and install and activate UpdraftPlus. I hope you know how to install a WordPress plugin.

Step 2:-

Go to Settings>>UpdraftPlus Backups where you see the available backups. As you just installed this plugin, there is no backup file present.

Step 3:-

To initiate the backup process, you need to click on the big Backup Now button.

Step 4:-

Within a few seconds, the backup process starts, and you can see a backup file under Existing Backups. You can see there are separate backups for the database, plugins, themes, and others.

Step 5:-

Now, you may be wondering how to download these backup files to your computer. Well, all you need to do is click on any of the buttons including database, plugins, and others, a box appears above the backup files.

Here, when I click on the database button, a box comes up with two options—Download to your computer and Delete from your web server.

Here you want to download, so, click on the first button and the downloading process starts in your browser.

Similarly, you can download all the files to your computer.

Isn't that easy to backup your website and its database using this plugin? You will be glad to know that you can also schedule the backup in advance. I just explained a manual method of download the backup files a WordPress site. You can also use Dropbox, Google Drive, Google Cloud, and a few other platforms to store the backup files.

If you click on the Settings tab of the UpdraftPlus plugin, you can see a lot of options to choose from. Of course! You can schedule the backup for files and database.

Now that you have learned how to backup your WordPress site, it's time to learn the restoring process. If you don't know how to restore, the backup files are of no use.

Restoring Backup Files Using UpdraftPlus

One of the best features of this plugin is how convenient it is to manage the backup files. You can use the backup files if your website gets hacked, or you wish to migrate your site from one host to another.

If you want to restore the backup files to your existing website, you have to delete the WordPress installation and start from scratch.

Have a new WordPress installation. Either use cPanel or use the re-install option from the WordPress admin panel.

As usual, install and activate the UpdraftPlus plugin to restore the backup files you backed up in earlier.

Follow these steps.

Step 1:-

Once again, after installing and activating UpdraftPlus, go to Settings>>UpdraftPlus Backups and scroll down to find an option to Upload backup files.

Click, and you can see a button to Select Files. Choose the backup files of the database, plugins, themes, and others.

Step 2:-

Whenever you upload a file, you see it under Existing backups. You can also find an option to restore the file. Click to initiate the restoring process.

Step 3:-

A popup appears to select a checkbox for the database. Check it and click on the Restore button. Depending on the size of the database, the process finishes accordingly.

Similarly, you have to repeat the restoring process for all the backup files. Once done, clear cache and check your site's content.

If you find everything just like your previous website, congrats! You have successfully finished the restoring process for your WordPress site.

Sometimes, you might notice some media files missing from your blog posts. Well, you can always upload again to your current WordPress media library.

Checking everything on your site is important. Blog migration or restoration can be tricky sometimes. I hope you don't face any problem.

Isn't it Easy to Backup and Restore a WordPress Site Using UpdraftPlus?

Every time you read a new tutorial, you should think if you want to use it or not. It's always a good thing to try something in a local environment.

I know, for non-techie people, the concept of creating a local environment is scary, but if you try, it's easy. Anyways, I have explained a step by step process to backup and restore a Wordpress website using UpdraftPlus.

I am sure; you won't fret while following this tutorial. Each step has a screenshot to guide you on how the process works. Backing up a site can be tricky because of so many options.

But with the use of the UpdraftPlus plugin, everything seems a piece of cake. As I mentioned earlier, it's important to decide whether you want to download the backup files to your computer or store them to any of the platforms available.

Many WordPress experts recommend having more than one copy of the site's backup files. So, you can download to your computer as well as use Dropbox or any other plugin to keep another copy.

Depending on your choice and convenience, you can go for an option. I hope you can easily follow this tutorial to backup and restore your WordPress site.

Just because of easy WordPress is, even a non-techie person can manage their site. Enjoy using WordPress!