- From User@UbuntuServer:/var/www/html$ I will run the following command to make sure that the command is working
sudo php wp-cli.phar –info
- I’ll move the file to a new path and location so I can access it from anywhere using only the command WP.
First I will give the required permissions
moh10ly@Ubunut-Mohammed:/var/www/html$ sudo chmod +x wp-cli.phar
Next I will move the file
sudo mv wp-cli.phar /usr//local/bin/wp
- Check if the file is working properly after moving?
- Final step is to change the domain of your wordpress site to a new domain.
So I only used two commands to change the domain name to the new one
- moh10ly@Ubunut-Mohammed:/var/www/html$ wp option update home “http://www.moh10ly.website“
- moh10ly@Ubunut-Mohammed:/var/www/html$ wp option update siteurl “http://www.moh10ly.website“
Now I tested my website and it’s working perfectly…