Forum archive
Changing the default path for wordpress from root to <url>/blog
Hi guys, I'm trying to move my Wordpress blog over to turnkey Wordpress Virtual Appliance.
My current blog is http://www.simonlong.co.uk/blog and I need my new installation to be the same.
With the default installation of Turnkey Wordpress it would make the wordpress blog apprear here: http://www.simonlong.co.uk/
How can I change this? Would it be easier just to reinstall a new Wordpress instance?
Simon
You need to make 2 changes, one to the wordpress configuration, the other to the apache configuration.
Wordpress: /var/www/wordpress/wp-config.php
Before define('WP_SITEURL', 'http://'.$_SERVER['HTTP_HOST']); define('WP_HOME', 'http://'.$_SERVER['HTTP_HOST']); After define('WP_SITEURL', 'http://'.$_SERVER['HTTP_HOST'].'/blog'); define('WP_HOME', 'http://'.$_SERVER['HTTP_HOST'].'/blog');Note that you might want to replace $_SERVER['HTTP_HOST'] with your domain name.
Apache: /etc/apache2/sites-enabled/wordpress
Add the above to the apache wordpress configuration, for example, after NameVirtualHost.
Once you have made the change, reload the apache configuration
I hope the above helps.