How to change URL in your WordPress site  using Shell on Linux Server

Learn | Teach Open Source Technologies

How to change URL in your WordPress site  using Shell on Linux Server

To change your URL you need to access functions.php file using Shell on Linux Server, functions.php file will be available in your current active theme.

We assume here our active theme is Twentyfifteen in our WordPress Site

root@www1:~# clear
root@www1:~# cd /usr/share/nginx/html/wp-content/themes/t
twentyfifteen/ twentyfourteen/ twentythirteen/ 

root@www1:~# cd /usr/share/nginx/html/wp-content/themes/twentyfifteen/

root@www1:/usr/share/nginx/html/wp-content/themes/twentyfifteen# vi functions.php 
<?php
update_option('siteurl','http://example.com');## add your URL by replacing example.com here##
update_option('home','http://example.com');
/**
 * Twenty Fifteen functions and definitions