i was using a wordpress install on an ubuntu server virtual machine. At first the adapter was host-only at an address of The host had this on a vboxnet0 subnet.
i changed to bridged adapter to try port forwarding from the router, and now i cant access the page with the new address.
the new address is and everything appears fine on routing tables of host.
i also cleared the dnsCache on the host.
but when i type in:
in the browser, the activity bar shows it is trying to contact the old ip of, which was the vboxnet0 host-only adapter.

2 Answers 2


The easiest way to do this is by using copy&replace in the SQL file. Export the database. Use your favorite text editor and do a copy&replace and import it into a new database.

Then you go to wp-config.php and you change the WP_HOME and WP_SITEURL to the new host. Then you change the databasename. You also need to ensure that the same db user has access to the database.

Btw: There is a separate stackexchange for wordpress. Check out How do I move a Wordpress site to another server?


You can use this script to do the database find and replace without needing to do the SQL dump. Usual caveats apply - take a backup and delete the script after use. It's actually a better option that the text editor find & replace as it accounts for serialized arrays, which a text editor find & replace doesn't.

Wordpress (and others) search and replace tool

You'll still need to make the wpconfig.php edits manually.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.