How to Uninstall and Reinstall WordPress

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)

  1. Delete all your WordPress files and folders from the site (usually from your ‘public_html’ directory).
  2. 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.
  3. 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)

  1. Delete the WordPress database user and table.
  2. 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)
  3. 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.

Comments (42 responses)

  1. Katy says:

    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

  2. MattyD says:

    You rock, thank you !!

  3. admin says:

    @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.

  4. Vedad Grozdanic says:


    I am using Optimized WordPress hosting, with HostGator.

    If I was to uninstall WordPress via HostGator’s customer portal, and then re-install it, would I be able to retrieve the old content from my website?

  5. rz says:

    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

  6. admin says:

    @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:

  7. rz says:

    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!

  8. admin says:

    @Thomas, Yes you can use the same approach for localhost setup also.

  9. thomas says:


    how to reinstall wordpress on localhost? can we use approach 1?


  10. trudy says:

    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

  11. admin says:

    @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.

  12. Aleena says:

    Wouldn’t that delete all my postings?

  13. admin says:

    @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).

  14. nick says:

    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

  15. Todd says:

    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.

  16. William Luke says:

    Thanks for the sharing. very informative

  17. Chiranjeev says:

    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.

  18. funbrain says:

    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 ; 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.

  19. admin says:

    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.

  20. Alex says:

    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

  21. admin says:

    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.

  22. Christien says:

    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.

  23. Ray Casey says:

    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.

  24. Rahul Gupta says:

    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.

  25. anch says:

    thanks for the tip it was quite useful.could not find a better way to reinstall my site

  26. Jonathan says:

    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.”

  27. Hung says:

    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

  28. Classifieds says:

    Thanks for the info about deleting the tables…was stuck on it all night !!

  29. admin says:

    Are you using a FTP program to delete the files? Try a FTP program like “FileZilla”

  30. dk says:


    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?

  31. admin says:

    Not sure what you mean.. can you elaborate please?

  32. chris brown says:

    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.

  33. admin says:

    A table in this context is referring to a “MySQL Database Table”.

  34. Daniel says:

    what is table? can you elaborate?

  35. rosie says:

    hello – im new to databasing. can you go into a bit more detail on how to delete the wordpress database’s ‘user and table’?

  36. seo specialist says:

    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.

  37. admin says:

    @jm, not sure I understand what you mean by primary and secondary articles in wordpress.

  38. jm says:

    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..

  39. Horst says:

    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.

Speak Your Mind