I've installed wordpress on two websites on 2 different domain.
Both website has installed the same version of wordpress.
Now, I've moved all the files of xyz.com
to 123.com
and changed the URL from 123.com
to xyz.com
from wordpress settings.
But there is still showing base URL as 123.com
.
How can i replace the URL permanently to xyz.com
?
Thanks
Here are the steps you can follow:
1) open phpmyadmin or any other mysql client.
2) open wp_options
table.
3) search for siteurl
& home
and change the url there.
4) dump sql file and search replace any occurrences of that url to new url, and then upload new changes. (make sure you have the backup of sql dump).
You are done..
You didn't mention about exporting your wordpress database from xyz.com to 123.com. you should have search for xyz.com and replace it with 123.com before importing database to 123.com
like datas in wp_options
siteurl,home should also be replace with 123.com and some other datas inside the database that contains xyz.com should be changed to 123.com.
Steps how to manually Change all the links
search for 123.com and replace with xyz.com
You could also use Better Search Replace Plugin
Note
Always Be Careful and always make your database backup.
Here you'll find everything you need:
https://codex.wordpress.org/Moving_WordPress
Like Sagar Guhe allready said, you can change the URL in your database.
Database name and authentification are set up in the config file in the root directory of wordpress in case you need to change that.
123.com
replace it with the desired url that is xyz.com
do find and replace xyz.com
located in the root folder named as wp-config.php
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.