What does the “Update WP database” task do?

Hi all,

I’m fairly certain I already know the answer to this question but…

Out of the box Trellis doesn’t do anything with the database when it deploys right?

I’m assuming it just needs the database username, password etc. so it can create a valid .env file.

The reason I ask is because I see this line in the logging when I deploy:

TASK [deploy : Update WP database] ****************************************************************************************************************************************************************
skipping: [kinsta_production]

I know it’s skipping, but I’m just curious under what circumstances would it not skip this step and do something that I might not want it to do, when I least want it to.

Regards, John.

That task invokes the WP CLI (wp core update-db) during deployment:

wp core update-db “Runs the WordPress database update procedure.”

That task only runs when the variable project.update_db_on_deploy or update_db_on_deploy is set to true, the latter is, by default:
Is it set to false there or somewhere else in your Trellis project, as for that particular site/project?

1 Like