0

I am still at the beginning and just wondering how to uninstall totally WordPress and then reinstall it. I installed first time from this tutorial.

  • I'm sure arzyfex wanted to say DROP DATABASE wordpress – lese May 24 '16 at 9:56
1
  1. go to your html folder

    cd /var/www/html

check current files in the html folder using ls command

ls

delete wordpress installation folder from there . you can use terminal to do that.

sudo rm -rf *

remember -rf forcefully delete all sub-directories . -r > remove the entire directory and all its contents, including subdirectories.

f -> force delete ( only if you need ) .

and * delete is saying "delete all " so be carefull when you perform these actions . I just add * assuming you don't have any other files inside html folder other than wordpress installation.

or you can open nautilus there using

sudo nautilus . 

and delete all files there , make sure to not delete other folders if you have any .other than wordpress installation files.

delete database from mysql .

goto mysql using

mysql -u root -p 

it will prompt asking password . type your mysql password if you have any added when you install mysql . else just press enter without password .

check your databases using

show databases;

and find your database in this case i assume it is call "wordpress"

drop it using

drop database wordpress;

it will prompt successful message .

thats all .

when you install wordpress next time in your localhost , be sure to install inside to folder . not directly into /var/www/html

you can achieve that by

sudo mkdir /var/www/html/wordpress 

and move to wordpress when you moving

sudo rsync -avP ~/wordpress/ /var/www/html/wordpress

let us know if you have any trouble.

0
  • Make sure you keep backup before doing this. find folder called wordpress in /var/www and delete them using rm -rf or if you have extracted the content of wordpress in /var/www then simply remove contents of /var/www/html/.
  • If you have installed wordpress using apt-get then use sudo apt-get purge wordpress.
  • remove the database from mysql using DROP DATABASE wordpress.
  • then follow the procedure to install.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.