简体   繁体   中英

Manually updating a Wordpress database

I am currently working with a team of developers trying to port our website to WordPress. On our local dev. server, we have complete ability to edit MYSQL schema. However, our parent company runs the MYSQL server on our production server, meaning we can't make script-based schema changes. Instead if we want to change anything in the MYSQL schema, we have to log the change, and mail it to them.

This makes upgrading WordPress tricky, since WordPress automatically generates and executes the SQL when it updates. We simply can't do this, and need a way to get SQL commands WordPress uses on our local server.

I agree with Pekka웃's comment, but if you really must do this I think the easiest way would be to use MySQL logging. Turn it on on your local machine, run your upgrade, and check the content of the file.

Depending on what version of MySQL you have, something like this should create a file to use as a base:

SET GLOBAL log_output = "FILE";
SET GLOBAL general_log_file = "D:/tmp/mysql.log";
SET GLOBAL general_log = 'ON';

I can't help think getting the parent company to run the upgrade would be much, much better though. Minor differences between dev and production could cause unexpected issues.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM