How Do I Change My WordPress URL From Command Line?

If you want to change your WordPress website URL from the command line, there are a few things you need to do. First, you’ll need to find your website’s current URL. To do this, open your website’s administration page (usually found at www.yourdomain.

com/wp-admin) and click on “Website Address.” Next, copy the website’s address that appears in the text area of the window. Finally, you’ll need to open a command line terminal and navigate to your website’s directory. Once there, you’ll need to type the following command:.

cd /var/www/yourdomain.com

Next, you’ll need to run the following command:

url –shortening yourdomain.com

This will return your website’s current URL in a shorter format. Finally, you’ll need to replace the URL in the command line with the shortened URL you just obtained.

For example, if your website’s current URL is www.com/blog, you would type the following command:.

url –shortening blog.com

Once you have replaced the URL in the command line, you can exit the command line terminal and reload your website.