-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it damn cheap to refresh staging #35
Comments
@michael-voit |
There might be a cheap way to selectively use filters for that job depending on environment. |
I think you got everything.... If I do refresh the staging next time, I can write down every step I make. But I'm quite sure that the list is a wonderful startingpoint. |
change SMTP settings This could be accomplished by https://github.com/wordplate/mail via .env settings that are not set or set so specific data on staging Would require to introduce an .env file that will anyway come with WordPlate |
deactivate CDN what needs to be done here? Could CDN be a solution for syncing images to staging without the need to download them? alternatively there could be a function to trigger after-db-pull option overwrite. |
deactivate Backups that could also be as cheap as deactivating the plugin, right? |
maybe there are plugins to selectively activate or deactivate eg query monitor or caching that is most likely worth to build. Could be a MU plugin that filters the 'active_plugins'-Setting like in the shy-ajax-handler: If switching to WordPlate these plugins would need to stay out of the mu-activation. The configuration for that most likely should go in the .env-file so this can be configurated by instance. Maybe I want to have some other plugins auto activated/deactivated on my local installation. Live could be the main source and we add/substract what we don't want on staging / local Hm - that would ultimately overpower the database. Which would be fine most of the time. But I feel like that could cause troubles. Could it be a thing to deactivate the possibility to activate/deactivate plugins in live all together? I guess this should be an action that runs after refresh -> so after pulling db change and after deployment |
add anonymization of DB https://github.com/deliciousbrains/wp-migrate-db-anonymization Install on live site - have deactivated on others |
is there DB overhead to reduce? Already trying to reduce overhead but will open a separate issue for that. |
minimal meaningful sub-portion to pull The goal is to reduce wait time for DB pull to encourage us to keep the database fresh What is the MVsP (minimal valuable sub portion)
Rarely important:
Yes, Options, Posts and Post_Meta should be enough for a quick update |
WP Migrate DB Pro CLI WP Migrate DB Pro has a CLI - so there would be the option to run a pull on each deployment to staging: negative consequences: There could be an automatic pull on deploying branch "develop" only. |
WP Migrate DB Pro Hooks there is the possibility to preserve individual options (eg 'active_plugins') Run something after the migration this might be handy:
|
speed up migration a bit up the size of rows per segment to lower the number of requests needed add_filter( 'wpmdb_rows_per_segment', function () { |
This will be maintained in the original issue (all the way up) now so here is the plan
OPEN - image handling |
Traumhaft. Vor der Umstellung auf production halt auf staging gut testen - aber das ist eh klar.... ;) |
I think it could work for all images you also have on production. But if you test something with new images on staging, the CDN plugin rewrites the url and the CDN than looks on production for this file - and will not find it there.... So it should work in the most cases - but not always... to be tested... |
Sounds good to me (the optimal version). The second point includes the option to run a pull on each deployment to staging, right? So we would include the CLI commands to deployHQ. Pull via CLI after the deployment, after that flush the cache via CLI. Like it! |
I forgot about the automatic db pull after deploying staging, good catch. But just limiting it on the develop branch feels like a great idea. That way feature branches can live in their own world for as long as that is needed (but can manually synchronize any time) but Cache should be flushed on every deployment (all branches, all version), so should be the rewrite rules and transients. |
For the images/attachments, I want to test Plugins/Solutions that "fall back" to server files. This is how it should work:
I started testing such tools but was not yet convinced/sucessful possible solutions
|
If we can limit it to only the develop branch, would be good. Even better could be to limit it to release-branches, if possible? In that way we would get a fresh clone for the final tests (I always do them in a release-branch) but can work as we are used to in develop.
absolutely. deployHQ should have the cli command to flush the cache after every deployment. I can check that once we implement this. |
Exactly. I searched for such solutions, too, back than - but not found anything working. |
Ich aktualisiere die initiale Issue-Karte um dort den Zwischenstand des Plans festzuhalten. |
First update - Plugins as WordPlate is already initiated in the "next" repository this task was checked from the beginning. I have now configurated the plugin loading mechanism. This plugins are not yet solved:
These are three "premium" plugins that are not open to being grabbed via composer and not popular enough to have workarounds (in contrast to ACF Pro) I contacted the support of BackWpUp -> they use composer internally but not yet externally and will ask the support. I have not too much hopes right now but could be a thing to check their update mechanism. I contacted MailPoet but have not yet heard from them. There is nothing in their docs + nothing on google so I have not big hopes. YARPP Experiments seems to be an old experiment thing of YARPPs. Do you know what that adds to the mix? For these three there would be the possibility to just throw them in version control and update them the old fashion way. Not thrilled by that, but at least all the other plugins are in the new loop. Any thoughts @michael-voit |
Hey @ibes - thank you very much.... let's try it the other way round: is there a backup-plugin (just database is enough) and a newsletter plugin (that can at least send a weekly automated newsletter with the new articles) that would work with composer and ideally an env-file (as we have sensible access data for both of them)? YARPP Experiments will be checked by me. I think, we will remove it... |
YARPP Experiments is removed as it was not doing anything anymore with the newer versions of YARPP. FYI: A new plugin we are using is "Lightweight Subscribe To Comments" |
MailPoet is quite an advanced plugin for that task. I am not sure if there will be a replacement we actually want. For backup: What does the pro-Version add? https://wordpress.org/plugins/updraftplus/ could be an alternative. I have used it in a couple of websites but never had shit hitting the fan - but as it is one of the popular ones I imagine it would be fine. It allows to store backups in the cloud. Cool - YARPP Experiments is removed. Lightweight Subscribe To Comments is already in my list :) |
Newsletter Backup |
BackWpUp Pro |
Newsletter |
The original needs
the plan
The text was updated successfully, but these errors were encountered: