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

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.

Found this resource interesting? Subscribe to Tips and Tricks HQ

email icon rss feed icon twitter icon google plus icon

Comments (32 responses)

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

  2. Aleena says:

    Wouldn’t that delete all my postings?

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

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

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

  6. William Luke says:

    Thanks for the sharing. very informative

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

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

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

  10. 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
    URI: http://www.epicnights.ca/wp-content/themes/Anan/js/fancybox/jquery.fancybox-1.3.0.js?ver=1.3

    from Internet Explorer
    thanks

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

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

  13. 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.
    Regards
    Ray

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

  15. anch says:

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

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

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

  18. Classifieds says:

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

  19. admin says:

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

  20. dk says:

    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?

  21. admin says:

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

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

  23. admin says:

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

  24. Daniel says:

    what is table? can you elaborate?

  25. 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’?

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

  27. admin says:

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

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

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

*