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.
go to your html folder
check current files in the html folder using ls command
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 ) .
* 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
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.
- Make sure you keep backup before doing this. find folder called
/var/wwwand delete them using
rm -rfor if you have extracted the content of wordpress in
/var/wwwthen simply remove contents of
- If you have installed wordpress using
sudo apt-get purge wordpress.
- remove the database from mysql using
DROP DATABASE wordpress.
- then follow the procedure to install.