0

Wordpress website for a small company. i am able to install wordpress in IIS server. my doubt is when installing , i am giving the ip address as "192.168.0.101:87".Everything works fine.I created menus and related pages. It works fine.it can be accessed by other machine within in the office.

what actually looking for "if i need to move the complete wordpress to other machine or to server i must change the ip address in database manually" otherwise it wont work.

how can i solve the problem? please let me know in detail if any one can help me out thanks in advance

1

I agree with @robin and tend to use that search & replace tool (interconnectit) for more complex DB's. For simple installs though, I like to use Peach, since it's a slightly less involved process. I'll often start off trying Peach, and then move to interconnectit's tool if there are any issues with the transfer (I've had some issues with Peach handling the data properly from custom metaboxes).

0

have you tried switch statment in wp-config?

/* URLS - not used anymore - doesn't work in Multidomain system*/
define('WP_HOME',           'http://'.str_replace("www.","", $_SERVER['HTTP_HOST']));
define('WP_SITEURL',        'http://'.str_replace("www.","", $_SERVER['HTTP_HOST'])); 

switch(str_replace('http://', '', WP_HOME)){

    case 'dev.domain.com': 

        define('DB_NAME',               'db1_dev');
        define('DB_USER',               'db1_dev_user');
        define('DB_PASSWORD',           'db1_dev_password');
        define('DB_HOST',               'db1_dev_hostname');

        define('MEDIAURL',              'http://media.'.WP_HOME);
        define('MEDIAPATH',             '/var/www/media'.WP_HOME);

    break;

    case 'stage.domain.com': 

        define('DB_NAME',               'db2_stage');
        define('DB_USER',               'db2_stage_user');
        define('DB_PASSWORD',           'db2_stage_password');
        define('DB_HOST',               'db2_stage_hostname');

        define('MEDIAURL',              'http://media.'.WP_HOME);
        define('MEDIAPATH',             '/var/www/media'.WP_HOME);

    break;

    case 'domain.com': 

        define('DB_NAME',               'db3_production');
        define('DB_USER',               'db3_production_user');
        define('DB_PASSWORD',           'db3_production_password');
        define('DB_HOST',               'db3_production_hostname');

        define('MEDIAURL',              'http://media.'.WP_HOME);
        define('MEDIAPATH',             '/var/www/media'.WP_HOME);

    break;

}
0

I use https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ DB search and replace -- you dont have to manually change db any more -and it also takes care of the serialization which makes sure that your widgets don't get deleted while moving from one domain/ip to another.

Your Answer

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

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