WordPress stores two addresses inside the database. These determine where your blog files are, and where the main index is. On a normal install, these addresses are the same.
There are two occasions where you will need to access the database to alter one or both of these settings:
1. If you have tried to alter the Blog URL or WordPress URL in Settings, and an error has occurred.
2. If you have moved to a domain/subdomain with a different name.
BACKUP your database before you begin and store the backup off your site server, like on your hard drive. See: Backing Up Your Database.
Edit wp-config.php
It should be possible to fix the site URL using a new feature -
Add these two lines to your wp-config.php, where “example.com” is the NEW location of your site.
define(‘WP_HOME’,'http://example.com’);
define(‘WP_SITEURL’,'http://example.com’);
Change your IIS settings to reflect the new URL.
Old way-- change in database
Wordpress stores the host url in the database. Open your wordpress db and open the table called "wp_options" (since you said you used web pi, you can download the database manager add-in to the IIS manager so you can open MySQL database from within IIS manager), and look for the record with the "option_name" field value of "siteurl". The "option_value" field contains the host url that's being used for every wordpress object. Change the base URL to your desired value (like wordpress.domain.com) and all objects like pictures and links will use the base URL you set in that record.
No comments:
Post a Comment