It would be nice if you could have staging in two directions, and also push from live to staging websites (so both files and databases)
For databases, I've implemented the following:
(I am aware this is not the most secure option but it does work except for dropping tables but in normal cases, I don't expect that to be necessary with Wordpress)
Run this one time:
mysql -u ploi -p
CREATE USER 'allaccessuser'@'localhost' IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON *.* TO 'allaccessuser'@'localhost';
Insert the following in the post-deployment-script
/usr/bin/mysqldump --user=allaccessuser -pPASSWORD $dbstaging > "$dbstaging.sql"
mysql -u allaccessuser -pPASSWORD $dbprod
Any update when this will be implemented?
Since I'm also hosting Wordpress sites, this is a very important function.
Thanks in advance.
Coming from a WordPress perspective, this is an often-used feature because the live site often changes (in terms of files and database).
For example, just testing out if a new plugin would work on a live site without breaking things, for small development tasks on the live site, for redesigns and redevelopment based on the live site.
I am aware that it's not often the best development flow, but in practice, this often happens with client projects, because many times changes are made by multiple people on a live site and you need to copy this site to a development env.
Hi, This is also useful when a client may approach another developer at some point or try to edit code themselves and we need to ensure that when working on staging that we are not going to undo those changes (without even knowing fully what may have changed)
Without this, I have to leave PLOI for cloudways, which offers this functionality.