Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

i was using a wordpress install on an ubuntu server virtual machine. At first the adapter was host-only at an address of 192.168.55.55. 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 192.168.1.5 and everything appears fine on routing tables of host.
i also cleared the dnsCache on the host.
but when i type in:
192.168.1.5/wordpress
in the browser, the activity bar shows it is trying to contact the old ip of 192.168.55.55, which was the vboxnet0 host-only adapter.

share|improve this question
add comment

migrated from webapps.stackexchange.com Jun 14 '11 at 4:51

This question came from our site for power users of web applications.

2 Answers

up vote 5 down vote accepted

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 http://wordpress.stackexchange.com/questions/5105/how-to-move-a-wordpress-site-to-another-server

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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