It's not always ideal, but occasionally you'll need to completely reset WordPress to its original state. Before blindly jumping to use a plugin, it's important that you understand exactly what it means to reset WordPress.\r\n\r\nUnderstanding the ins and outs of a WordPress installation (and what needs to be reset!) will help ensure that you're making smart decisions in your development process. Sometimes your chosen reset plugin doesn't work as expected and you'll need to clean up manually, for example. Being able to do this ensures that you'll be able to quickly rectify the situation. If you use <a href="https:\/\/pagely.com\/" target="_blank" rel="noopener noreferrer">managed WordPress hosting<\/a> don't forget to speak to your host first.\r\n\r\nIn this article, you'll learn about when and why you might want to reset WordPress. Then, we'll walk you through the necessary steps for manually resetting a WordPress website. Let's get started!\r\n<h2>Why You May Need to Reset WordPress<\/h2>\r\n<img class="aligncenter size-full wp-image-12645" src="https:\/\/pagely.com\/wp-content\/uploads\/2017\/12\/wordpress-dashboard.png" alt="The WordPress dashboard." width="1400" height="574" \/>\r\n\r\nTo reset WordPress means to put all its files and databases back to the original installation state. It is effectively taking an existing WordPress website and installing it from scratch using what's already there.\r\n\r\nThere are a few reasons you may need to fully or partially reset your WordPress website, such as:\r\n<ol>\r\n \t<li>Rebuilding or repurpose the website.<\/li>\r\n \t<li>Restoring the site <a href="https:\/\/pagely.com\/blog\/route-pagely-backups-s3-account\/" target="_blank" rel="noopener noreferrer">from a backup<\/a>.<\/li>\r\n \t<li>Cleaning out a test installation.<\/li>\r\n<\/ol>\r\nResetting a WordPress website is essentially uninstalling existing settings and reinstalling the original defaults. This is possible to do by deleting everything and starting over. However, you may find yourself in a situation where you need to do a partial reset, so it's handy to understand the breakdown of steps so you can pick and choose what you need. For example, you may want to reset the database but keep all your downloaded plugins intact.\r\n\r\nSimilarly, you can accomplish a lot of manual tasks using plugins like <a href="https:\/\/wordpress.org\/plugins\/reset-wp\/" target="_blank" rel="noopener noreferrer">Reset WP<\/a> or even <a href="http:\/\/wp-cli.org\/" target="_blank" rel="noopener noreferrer">WP-CLI<\/a>. We find it's always a good idea to understand the fundamentals even when using these tools. It's similar to learning how long division works before using the calculator -- you'll better understand what you're doing even if you eventually automate the process. Knowing how to check your work can save a lot of time and hassle if something goes wrong.\r\n\r\nNow, you'll learn what it takes to reset your WordPress website without a plugin.\r\n<h2>How to Reset Your WordPress Website Without a Plugin<\/h2>\r\nResetting your WordPress website will involve having direct access to your files and database. This means you'll need a few tools and logins to get started:\r\n<ol>\r\n \t<li>Your <a href="https:\/\/codex.wordpress.org\/Using_FileZilla" target="_blank" rel="noopener noreferrer">File Transfer Protocol (FTP)<\/a> username and password.<\/li>\r\n \t<li>FTP software, such as <a href="https:\/\/filezilla-project.org\/" target="_blank" rel="noopener noreferrer">FileZilla.<\/a><\/li>\r\n \t<li>Database access, such as through <a href="https:\/\/www.phpmyadmin.net\/" target="_blank" rel="noopener noreferrer">phpMyAdmin<\/a> or within <a href="https:\/\/cpanel.net\/" target="_blank" rel="noopener noreferrer">cPanel.<\/a><\/li>\r\n<\/ol>\r\nIf you're not completely sure you want to lose all of your content and settings forever, you may also want to take a complete backup of your website, using a plugin such as <a href="https:\/\/wordpress.org\/plugins\/updraftplus\/" target="_blank" rel="noopener noreferrer">UpdraftPlus<\/a>. Be sure to save the backup somewhere off of the server, because you'll be deleting everything. Now, all you need to do is follow these steps. Let's get started!\r\n<h3><b>Step 1: Delete the Database<\/b><\/h3>\r\nThe first step is to delete your database. This is important, because it's where all of your settings and content lives. Without this step, you'll be stuck with everything you already have, which isn't conducive to starting afresh.\r\n\r\nDeleting the database will completely remove your content and settings from WordPress. We cannot stress enough that you need to be absolutely certain you are ready to lose all of your data before moving forward.\r\n\r\nFirst, log into cPanel. From here, you should be able to find your list of MySQL databases under the <i>Databases > MySQL Databases<\/i> section:\r\n\r\n<img class="aligncenter size-full wp-image-12641" src="https:\/\/pagely.com\/wp-content\/uploads\/2017\/12\/databases-cpanel.png" alt="cPanel's Databases section." width="1282" height="262" \/>\r\n\r\nOn this page, you should find a list of your existing databases. Some hosts name their databases differently, but typically include the prefix <i>wp<\/i> somewhere within the database name.\r\n\r\n<img class="aligncenter size-full wp-image-12639" src="https:\/\/pagely.com\/wp-content\/uploads\/2017\/12\/current-databases.png" alt="The Current Databases tab." width="1400" height="274" \/>\r\n\r\nIdentify your WordPress database, and copy and paste the name into a text file somewhere safe. Then, you can delete it by clicking the <i>Delete<\/i> button from the <i>Actions<\/i> column. This will completely wipe out your old WordPress database.\r\n<h3><b>Step 2: Create a New Database<\/b><\/h3>\r\nWhile you've just deleted the old database, it's vital to set up a new one. Without a database, your WordPress website will not be able to load and you will not be able to access the dashboard to create any new content.\r\n\r\nOnce your old database is gone, it's time to create a new one and set it up for WordPress. You should still be within the cPanel database page, so find the <i>Create a New Database<\/i> section. Here, you'll complete the database name so it matches the old one:\r\n\r\n<img class="aligncenter size-full wp-image-12638" src="https:\/\/pagely.com\/wp-content\/uploads\/2017\/12\/create-new-database.png" alt="cPanel's Create a New Database screen." width="1400" height="197" \/>\r\n\r\nAfter clicking <i>Create Database<\/i>, the page should refresh and you'll see the name pop up again under the <i>Current Databases<\/i> area. Next, find the <i>Add a User to a Database<\/i> section. You'll need to add the old user with its permissions to the newly created database. Select the matching database and username in the drop-down menus and click <i>Add User<\/i>.\r\n\r\n<img class="aligncenter size-full wp-image-12640" src="https:\/\/pagely.com\/wp-content\/uploads\/2017\/12\/database-username.png" alt="The Add a User to Database screen." width="590" height="252" \/>\r\n\r\nIf you can't find the old user, you may need to create it manually. This is easily possible under the <i>Add a New User<\/i> section. If possible, use the same username and password as the old database user. You can usually find these in your website's <i>wp-config.php<\/i> file.\r\n\r\nIn your FTP program, navigate to your website's <i>public_html<\/i> folder. From here you should see the WordPress root files. Right click on <i>wp-config.php<\/i> and choose <i>View\/Edit<\/i> within your FTP program:\r\n\r\n<img class="aligncenter size-full wp-image-12647" src="https:\/\/pagely.com\/wp-content\/uploads\/2017\/12\/wp-config-file.png" alt="The wp-config.php file." width="1040" height="236" \/>\r\n\r\nYou don't need to edit anything once you're looking at the file. Instead, find the credentials for your old database user under <i>MySQL Settings<\/i> in the file.\r\n\r\n<img class="aligncenter size-full wp-image-12648" src="https:\/\/pagely.com\/wp-content\/uploads\/2017\/12\/wp-config-settings.png" alt="wp-config's Settings." width="636" height="256" \/>\r\n\r\nOnce you have these credentials, you can use them to recreate the correct user in MySQL. Don't forget to follow the prior directions and add the user to the database once you've created it!\r\n<h3><b>Step 3: Remove Unnecessary Files<\/b><\/h3>\r\nWith a clean database, you are now left with all the plugins, themes, and uploads you added to the old website. It's important that you remove these, or you'll have tons of unnecessary bloat on your new website. This isn't preferable on a fresh site.\r\n\r\nNow that your database is cleared up, you'll want to turn your attention to your WordPress files. Most WordPress files remain the same between installations. What you'll want to address are unique additions, such as plugins, themes, and media. These all exist within the <i>wp-content<\/i> folder.\r\n\r\nYou can delete these via FTP. Log in using your favorite FTP application, and navigate to your WordPress' root directory under <i>public_html<\/i>. Find the <i>wp-content<\/i> folder and navigate inside.\r\n\r\nAt this point you should see <i>plugins<\/i>, <i>themes<\/i>, and <i>uploads<\/i> folders. You may also see a few others. Select every folder except for <i>themes<\/i> and delete them all.\r\n\r\n<img class="aligncenter size-full wp-image-12643" src="https:\/\/pagely.com\/wp-content\/uploads\/2017\/12\/themes-folder.png" alt="Folders highlighted, apart from the themes folder." width="1040" height="246" \/>\r\n\r\nNext, navigate inside the <i>themes<\/i> folder. Choose the theme you'd like to keep, such as <a href="https:\/\/wordpress.org\/themes\/twentyseventeen\/" target="_blank" rel="noopener noreferrer">WordPress' Twenty Seventeen<\/a>. Select every theme folder except for your chosen theme, and remove them from the server.\r\n\r\n<img class="aligncenter size-full wp-image-12644" src="https:\/\/pagely.com\/wp-content\/uploads\/2017\/12\/twentyseventeen-folder.png" alt="All themes highlighted, apart from the twentyseventeen folder." width="1038" height="390" \/>\r\n\r\nAt this point, you have now wiped out all unique elements related to your WordPress website. The database is completely empty, and all unique files have been removed. All that's left is to reinstall WordPress from scratch!\r\n<h3><b>Step 4: Run the WordPress Installation Script<\/b><\/h3>\r\nAt this point, everything in your WordPress site is sanitized and cleaned out. Unfortunately, if you leave it at this stage, you'll not have a functional website -- you need to rerun the WordPress installation script.\r\n\r\nFinally, you're ready to revert WordPress back to its default settings. You can load up the installation script by adding <i>\/wp-admin\/install.php<\/i> to the end of your domain name. You'll need to pick out a few settings, such as language and your new login information:\r\n\r\n<img class="aligncenter size-full wp-image-12646" src="https:\/\/pagely.com\/wp-content\/uploads\/2017\/12\/wordpress-install.png" alt="The WordPress installation screen." width="1220" height="812" \/>\r\n\r\nWithout this process, your database is completely blank. If you don't run this script, WordPress will be unable to function. Once you've filled in the entire form, you can click <i>Install WordPress<\/i>. You'll be greeted with a welcome message:\r\n\r\n<img class="aligncenter size-full wp-image-12642" src="https:\/\/pagely.com\/wp-content\/uploads\/2017\/12\/success-message.png" alt="WordPress' success message." width="1400" height="779" \/>\r\n\r\nSimply click <i>Log In<\/i> and you'll be on your way with a new WordPress website! This will regain your access to the site, and you'll be working with a completely clean slate.\r\n<h2>Conclusion<\/h2>\r\nResetting your WordPress website may not be the most thrilling task, but it is a good skill to have in your repertoire for fixing broken websites and cleaning up unnecessary files. Even if you use a plugin, it gives you the power to understand what is going on underneath the hood when resetting everything from scratch.\r\n\r\nIn this article, you learned how to do this manually in four steps:\r\n<ol>\r\n \t<li>Delete the WordPress database.<\/li>\r\n \t<li>Create a new database.<\/li>\r\n \t<li>Remove unnecessary files.<\/li>\r\n \t<li>Run the WordPress installation script.<\/li>\r\n<\/ol>\r\nWhat questions do you have about resetting WordPress? Let us know in the comments section below!