Modify WP installation path and Database Name

Source: Internet
Author: User

In the past few days, the WP has been upgraded from 2.3.2 to 2.5, and the performance has been improved a little. Moreover, the operation is more convenient and you are more and more fond of this Compact but powerful program!
However, the original WP installation path is G:/pub/html and the database name is HTML. Now I want to change them to G:/pub/blog and blog. It took me some time to complete the results.
First, change the directory G:/pub/html to G:/pub/blog, and change the database name in phpMyAdmin to blog and its corresponding user permissions, change the prefix of all tables from the original "HTML _" to "blog _", and change siteurl and home in the blog_options table to http: // wind/blog in the blog database, then modify the WP new installation directory G:/pub/blog under the wp-config.php file, use the new db_name, db_user, change table_prefix from the original "HTML _" to the new "blog _". The related modifications are as follows:

// ** MySQL settings **//
Define ('db _ name', 'blog '); // The name of the database
Define ('db _ user', 'bloguser'); // your MySQL Username
......

// You can have multiple installations in one database if you give each a unique prefix
$ Table_prefix = 'blog _ '; // only numbers, letters, and underscores please!

Now it seems that you can access the WP website, but an error occurred while logging on as the original administrator! Why? I think there is a problem with an internal link, and the data should be kept in the MySQL database, so I searched the entire blog database in phpMyAdmin with the keyword "html ", we found that some information about the original path exists in the value of dashboard_widget_options in the blog_options table, so we changed the related "html" to "blog ". Log on to the WP background as an administrator again. Everything works!
(Note: I set up a server in the company's lan. The host domain name is http: // wind/, and the www root directory is G:/pub. In WINXP, apache2/Lighttpd + PhP5 + mysql5 is used as the server. Lighttpd uses FastCGI .)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.