Answer the question
In order to leave comments, you need to log in
What's the recipe for automatically deploying a wordpress site with Deployer?
Greetings!
There is a wordpress site. Task: set up automatic deployment.
As a deployment operator, I still see Deployer. This page describes the basic recipe. But it seems that there is not enough: creating / updating the database, etc.
Which script would be more suitable?
Or is there a better way to do this?
Thank you.
Answer the question
In order to leave comments, you need to log in
The database is best updated via WP-CLI.
Installation:
$ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
$ chmod +x wp-cli.phar
$ sudo mv wp-cli.phar /usr/local/bin/wp
desc('Export-import database');
task('database', function () {
runLocally('wp db export wp.sql');
upload('wp.sql', "{$deploy_path}/wp.sql");
run('wp db import wp.sql');
run('wp search-replace //example.dev //example.com');
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question