In this post I have explained how you can uninstall and reinstall WordPress. You will rarely think about uninstalling/reinstalling WordPress on your site unless you start having ‘Apache security mod rewrite and htaccess’ issue like myself. I decided to Reinstall WordPress on one of my sites after trying numerous fixes to solve the issue and getting no result. Some people uninstall/reinstall WordPress to start over from scratch. Anyway, whatever the reason is, you can uninstall and reinstall WordPress using one of the following methods:
Approach 1 (Full Clean Uninstall)
- Delete all your WordPress files and folders from the site (usually from your ‘public_html’ directory).
- Delete the WordPress database user and table (usually through ‘cPanel’ control panel if your site has ‘cPanel’). Go to the MySQL database section and you can remove the database and DB users from that interface.
- Now Install WordPress from the beginning like you did the first time and you are done (How to install WordPress).
Approach 2 (Quick Fix Uninstall)
- Delete the WordPress database user and table.
- Create new database user and table and update the ‘wp-config.php’ file with the new information (alternatively you can reuse the same user name and table name from previous and you won’t have to update the ‘wp-config.php’ file)
- Run the installer (install.php) by visiting your site.
How to Delete the WordPress Files and Folders
You can delete all of your WordPress files using one of the following methods:
Option 1: Log into your site’s cPanel/Control panel and go to the file browser. Find the folder where all the WordPress files are and remove those files.
Option 2: Log into your site using a FTP software (example, FileZiall). Go to the folder where WordPress is installed. Select all the files and folder then hit the delete button then confirm the deletion.
Option 3: If you have shell access to your server then you can log into your server using a SSH client then browse to the folder where WordPress is installed. Now issue the “rm” UNIX command to remove files and folders. This option should only be exercised by advanced users who are familiar with the UNIX system.
If you want to do a full WordPress blog deletion then check our how to delete a wordpress blog tutorial.
Video Tutorial
Additional Tips
#1) The tutorial on exporting and importing database tables should be helpful for the above operation.
#2) It is always a good idea to use the ‘robots.txt’ on your site to control the access of the web robots such as Google bot from coming and indexing your site when you are doing extended maintenance. You don’t want the bot to crawl and index your site when you just deleted the entire content of your site! Read the How to control access of the web crawlers or web robots to your site article to learn more.
#3) Get a cheap and reliable hosting for your WordPress site. The support team of a good webhost will help you if you have messed up the WordPress install.
Thanks saved my site from a real mess. w3 total cache was messing it up with that plugin gone all screwy thanks.
Then had issue logging into WordPress between you guys and this site here we got it all sorted. Yay
You rock, thank you !!
@Vedad, If you want to retrieve your old content then you should take a backup of your content. So you can import it after you re-install WordPress.
Thanks! I ended up just deleting the database entirely and then selecting “create database for me” when installing wordpress. Hope I did it right. :s
@rz, Just edit your wp-config.php file and specify your new DB name and password in there. The following tutorial has info on how to do that:
https://www.tipsandtricks-hq.com/how-to-install-wordpress-on-your-blog-instructions-with-screenshots-496
So, I’m just trying to start off with a clean slate. I won’t be uploading old content or anything like that. My problem is I forgot to look up the old password before deleting the SQL database, so I just created a new one. Is this going to be a problem? Also, why does it look like there’s still a bunch of stuff in the database even though I haven’t done anything new yet since ‘cleaning the slate’? I followed the instructions in the video and gave it the same name and username (just neglected to give it the same password).
Also, when I go to reinstall WordPress, how will it know which SQL Database to use? I have multiple. Thank you so much!
@Thomas, Yes you can use the same approach for localhost setup also.
hi,
how to reinstall wordpress on localhost? can we use approach 1?
thankyou
Thank you for the detailed and so exact description for what I needed to do, left my site alone for three mths but then had a brainwave and knew I had to remove my directories, happened on your advice and it worked, Thank goodness for you, WELL DONE thanks again
@Aleena, yes this will delete everything (including your posts). You can export the data before you do this if you want to keep the content.
Wouldn’t that delete all my postings?
@Nick, you probably should investigate the URL of the images and make sure they are not pointing to 404 pages. If you take the URL of a photo from your post and enter it in the browser, can you see it? If you can’t then you need to investigate the folder you put your photos in (maybe you uploaded them in the wrong place).
Having malware probs, rebuilt some of the sites with sql or ftp the pics are not there
How do I get the photos to show up again?I copied them back into into the FTP client, but they are “connectingâ€.
They don’t appear in my media gallery either.Do I need to re upload all of them again? many thanks
Great article! I like the many options that you provide. The video and Additional Tips were really helpful too.
I’m going to check out the WordPress Reset plugin that was mentioned in one of the comments above. It looks like it works pretty well.
The only other option I would add here is the process for uninstalling using the “one-click” software solutions like Fantastico or QuickInstall.
Thanks for the sharing. very informative
Great tutorial. I was really looking for such a tutorial to re-install wordpress. I was having some issued in my WordPress database. But thanks for your informative post.
Thanks,
This is a great advice admin, but I have another thing in mind. If wordpress users are tired of installing and uninstalling the their wordpress sites. And they want to see the backend fresh and new. try WordPress Reset you can download it here http://wordpress.org/extend/plugins/wordpress-reset/ ; Ive tried it many times already as a first timer on wordpress cms. brilliant plugin. Thanks again admin. hope to c more of your articles new or updated post.
The error you are getting is a JavaScript error. Most likely you are calling a function from a library before it has loaded in the page. When you delete your theme and install a fresh copy it should delete or change any content from your existing WordPress post or page.
Is it possible to reinstall a theme without messing up the content in the pages and links?
I dont know what happened but now my Gallery gives me
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.0.3705; .NET CLR 1.1.4322)
Timestamp: Wed, 2 Nov 2011 20:17:20 UTC
Message: ‘loading’ is null or not an object
Line: 292
Char: 3
Code: 0
from Internet Explorer
thanks
Not sure why you would have an issue deleting files via an FTP application (FileZilla). What error do you get when you try to delete? You can also ask your hosting providers to delete the content of your site from the server so you can start fresh and they will just delete it in one go.
Im having trouble uninstalling. I’ve done everything that has been suggested above. I originally removed the installation of the wordpress file in cpanel. But when I went to reinstall I had unable to install as I needed to remove files wp-admin, wp-content, wp-includes. And I did that within cpanel and it would appear that it was deleted but when I went back to reinstall wp again it would come up again manually remove files wp-admin etc. So I tried it within filezilla deleting files there. But I was unable to delete files within filezilla. Help please.
Thank you for this awesome information. I spent most of yesterday messing around in cpanel trying to delete a website and I had real problems. This has cleared it up nicely for me.
Regards
Ray
Thanks for the good advice. I was looking for a way to set up a new wordpress project out of an already existing wp system. Kind like a “cloneâ€. Why that? To avoid the efforts of reinstalling and configuring all the plugins and settings etc.
thanks for the tip it was quite useful.could not find a better way to reinstall my site
You also need to delete the file “installed_in_root.php” in the .fantasticodata folder or else you will be greeted when reinstalling wordpress with “The installation cannot be completed. You cannot install more than one script in the root directory of a domain.”
Hey thanks for your great advice.
This post is the best one I’ve seen about doing a manual uninstall. As you might have guessed I’ve got a problem I think I can only fix by starting over. I think I know what to do, but there a few things which have caused me to hesitate
What files do I delete to complete the ‘uninstall’? People say, ‘delete all wordpress files’ but my problem is I don’t know exactly which these are – I inherited the site a year ago and only now have had to think about doing this! I’m thinking that I should not delete everything in public.html, but instead delete just the following:
– every file beginning with ‘wp’
– everything beginning with ‘vtl’
– xmlrpc.php
– index.php
Or should I really just delete everything in public.html?
I can delete database / users etc no problem.
Thanks for help and keep up the good work!
Best wishes
Thanks for the info about deleting the tables…was stuck on it all night !!
Are you using a FTP program to delete the files? Try a FTP program like “FileZilla”
Hi,
I’m trying to delete wordpress and re-install it on my webhostingpad server. However, it wont let me delete the wp-includes file? Any suggestions?
Not sure what you mean.. can you elaborate please?
How do I get the photos to show up again? I copied them from the FTP client into my hard drive… then after I reinstalled the database, I copied them back into into the FTP client, but they are “connecting”.
They don’t appear in my media gallery. Do I need to re upload all of them again? Yikes.
Plese advise.
A table in this context is referring to a “MySQL Database Table”.
what is table? can you elaborate?
hello – im new to databasing. can you go into a bit more detail on how to delete the wordpress database’s ‘user and table’?
thanks for the detailed information on Wordpres Installation, i was looking for this solutions since 6 month, i have re-install my wordpress and its working perfect. thanks again.
@jm, not sure I understand what you mean by primary and secondary articles in wordpress.
hi i had problem, how can i delete the secondary article, because everytime i add a new article, the articles always goes to the secondary articles, the article should go on the primary articles, pls. help me..
Thanks for the good advice. I was looking for a way to set up a new wordpress project out of an already existing wp system. Kind like a “clone”. Why that? To avoid the efforts of reinstalling and configuring all the plugins and settings etc.
Don’t know if this would work? If you have any ideas how to do this “cloning” please drop me a few lines to horst.graebner (ad) gmx (dot) com. Thanks.