#1. I need to add this to wp-config.php
...............................................
//FIXME: do comment/remove these hack lines. (once the database is updated)
update_option('siteurl', 'http://www.mydomain.com' );
update_option('home', 'http://www.mydomain.com' );
...............................................
note: as for multisite I don't get the general setting option to change the URL there ?
#2. and then would need to transfer the files to the new server , and update-import the database ....
#3. and then if needed use the Search and replace plugin .... to change the post links used by my websites' blog user.
Is this all ? or is there any thing else ?
Will this leave the multisite settings undisturbed and working ?
Thanks again for your spontaneous help and reply , so I'm much a novice, but this transfer knowledge is very essential for me.
Showing posts with label URL. Show all posts
Showing posts with label URL. Show all posts
Tuesday, November 23, 2010
Thursday, October 28, 2010
Correct the WordPress site URLs
I accidentally changed the WordPress HOME and SITEURL to the root of my domain, which is pointing nowhere (default IIS start page) and I locked myself out of the WordPress admin. After a few minutes of research I managed to get the site running and login back to admin area again.
1. The first method is so easy so I figure I should give it a try:
->modify the wp-config.php file to add two lines:
define('WP_HOME','http://my.website.com/correctlocation');
define('WP_SITEURL,'http://my.website.com/correctlocation');
Problem: after you did above, the site is running and you will be able to login to the admin interface. However, the Home and site URL values are no longer available for editting (they are greyed out) through the general settings.
2. I restored the wp-config.php to it was and tried the second method. which works great.
->modify the current active theme's functions.php file, to add two lines right after <?php line:
update_option('siteurl','http://my.website.com/correctlocation');
update_option('home', 'http://my.website.com/correctlocation');
Site is running and had no problem to login, the general setting shows the correct urls for my site and home. save the change and logout.
**Important: Remove the two lines you just added from functions.php. Put the file back where it belongs. login and logout and everything should be fine.
3. there are other methods, like to edit directly in database. I did not try it. Hopefully I will not need it. Do a search "Changeing the site URL" in WordPress Codex will lead to more answers.
1. The first method is so easy so I figure I should give it a try:
->modify the wp-config.php file to add two lines:
define('WP_HOME','http://my.website.com/correctlocation');
define('WP_SITEURL,'http://my.website.com/correctlocation');
Problem: after you did above, the site is running and you will be able to login to the admin interface. However, the Home and site URL values are no longer available for editting (they are greyed out) through the general settings.
2. I restored the wp-config.php to it was and tried the second method. which works great.
->modify the current active theme's functions.php file, to add two lines right after <?php line:
update_option('siteurl','http://my.website.com/correctlocation');
update_option('home', 'http://my.website.com/correctlocation');
Site is running and had no problem to login, the general setting shows the correct urls for my site and home. save the change and logout.
**Important: Remove the two lines you just added from functions.php. Put the file back where it belongs. login and logout and everything should be fine.
3. there are other methods, like to edit directly in database. I did not try it. Hopefully I will not need it. Do a search "Changeing the site URL" in WordPress Codex will lead to more answers.
Subscribe to:
Posts (Atom)