use backup/restore to trransfer to a new domain?

5 posts / 0 new
Last post
#1 Wed, 07/18/2018 - 23:22

use backup/restore to trransfer to a new domain?

I've got a wordpress install in a subdomain in and I want to move it to, Overwriting the contents now at is ok. I don't see a way to do this, it seems as if backup and restore are designed to work only from/to the same domain. Is there a way to do this?

Mon, 07/23/2018 - 11:14

Thats more of a wordpress issue. That old domain name is saved in the wordpress database and the old domain is what it uses in its links.

You can just create new domain in virtualmin. Then FTP download the old WP folder, then upload to the new domain WP folder. Then go to databases and download a back up of the old database.
Then extract and open the database file on your local machine. IT will be a simple text file and can open with any text editor. Just use something that doesn't mess up the formating. Notepad or Gedit in ubuntu work.
Then while in the database text file, do a search and replace for the old domain name. Replace with Then save th DB as a new name, just so you don't get it confused with the old. Then create new DB for the new WP website in virtualmin. Then edit that DB and import the new DB.sql you just created.
Last step, open config.php of the new WP folder and edit the DB name to match the new DB.

Basically, manually move the domain WP files and database to the new domain. Then edit the DB to match new domain location.

Mon, 07/23/2018 - 17:51 (Reply to #2)

super! I'll try what you suggest (I have a test domain I can use) and let you know.


Wed, 11/28/2018 - 17:08 (Reply to #3)

it took quite a while but I found a nice easy solution, there's a plugin called all in one wordpress migration that exports and imports sites. Easiest way was install and export from old site, make a new wordpress install in target location, install the plugin there and run impott. Worked nicely in moving from PHP5 to PHP 7, really simple and no problems I've been able to see.

Wed, 11/28/2018 - 23:51
Joe's picture

I'll also point out you can rename domains in Virtualmin, but there will be some vestigial bits of the old domain (the name of the database doesn't change, because it would break any web app configs that expected the old name, for instance). I usually just add an alias when I want to start using a new domain. Everything else stays the same, but with an alias the website can be reached on the new domain name, and optionally mail can be sent/received for that domain.

Whether the web app accepts the new name is a configuration issue, but usually simple enough to change.


Check out the forum guidelines!

Topic locked