0

I have a wordpress site running on http://www.testdomain.com

now I want to change it to http://productiondomain.com/Branch (I dont have control of this server at all. they set it up for us)

So right now when I visit http://productiondomain.com/Branch I get redirected to http://www.testdomain.com (which is not what I want. I want the url to remain http://productiondomain.com/Branch at all times.

Im pretty sure there is something I have to change in wordpress settings and in .htaccess file or in Apache config but Im really clueless in this area.

Please help.

2
  • Off-hand, I don't recall a default setting in the .htaccess file that includes the domain, but Wordpress does set the URL under Settings > General. For more information, see the Codex
    – cyberx86
    Sep 29, 2011 at 14:33
  • Do you have access to phpmyadmin on productiondomain.com ? Sep 29, 2011 at 14:45

1 Answer 1

2

You will need to ask the MySQL db administration at productiondomain.com to change some values in your wordpress database there.

Lets assume your wordpress database is called wordpress_db. In this case you have to ask him to run the following two queries (first change the options according to your needs)

UPDATE `wordpress_db`.`wp_options` SET `option_value` = 'http://productiondomain.com/Branch' WHERE `wp_options`.`option_name` = `siteurl`;
UPDATE `wordpress_db`.`wp_options` SET `option_value` = 'http://productiondomain.com/Branch' WHERE `wp_options`.`option_name` = `home`; 

Alternatively you can add the following two lines to your wp-config.php file (again if you don't have access on the files of productiondomain.com, ask the admin there to do it for you)

define('WP_HOME','http://productiondomain.com/Branch');
define('WP_SITEURL','http://productiondomain.com/Branch'); 

There are also other ways, like adding two lines of code to your functions.php file, but one of the above two will do.

More information can be found here

9
  • Hmm.. I will keep control of the site. We are not planning on moving it anywhere. the site is currently hosted on justhost.com and I plan on keeping it there. its just that now we want to use a domain name that matches the rest of the company's sites.
    – nacho10f
    Sep 29, 2011 at 18:18
  • I don't understand your comment. You said that you moved the site to another server on which you don't have access to. I didn't say you should not keep control of the site. I just answered what you asked. Unless I didn't understand correctly. Sep 29, 2011 at 19:30
  • We havent moved the hosting at all... but we do need the dns to be different... the site will still be stored on justhost.
    – nacho10f
    Sep 29, 2011 at 21:42
  • Ok then I guess you have access to phpmyadmin for your wordpress database as well as your wordpress files (htdocs). So just do one of the above solutions and you'll be ok :-) Sep 29, 2011 at 21:49
  • Ive tried both solutions but I keep getting http 310 too many redirects :s
    – nacho10f
    Oct 10, 2011 at 6:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .