i was working on a wordpress blog under a test domain (example.com/blog/) and now i want to move it under its own domain which is on the same server but different vhost.

After googling a bit i found a way to do it by simply moving the files however this generated a 500 internal error. This is (almost) normal because the site reads the old site location. I had to update it with the follwing code placed inside the functions.php


I tried with this code to reload the page cuple of times as the wordpress docs said but again nothing! I also updated the database to the example.com but still nothing. Is it possible to fix it? Also can i simply change the vhost location to the /arduino/ folder?

My server config: Ubuntu 13 Nginx MariaDB

Current location: /var/www/clients/client0/web3/web/arduino/ Desired location: /var/www/clients/client0/web7/web/

Any ideas on how to make it work?

Im using ISPconfig to create virtual hosts

  • Go to PHPMyAdmin, download the whole database as a SQL file, open it on a text editor, search and replace old domain with new domain. Upload file back to database. I would recommend adding to a new database and then updating the config file - it's easier that way if you want to revert the changes. – gdaniel Jul 3 '14 at 21:45
  • To avoid in future you could also consider getting Delicious Brain's WP Migrate plug-in. It takes care of all the database rewrites and makes migrating the databases very easy. – Pat Gilmour Jul 3 '14 at 21:49
  • @gdaniel as i said i changed the database domain but nothing – Meletis Flevarakis Jul 3 '14 at 22:02
  • I wasn't sure you changed just in one option field, or the entire database. – gdaniel Jul 3 '14 at 22:08
  • i've changed the 'home' and the 'siteurl' – Meletis Flevarakis Jul 3 '14 at 22:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.