Optimizing deploy and update of custom solutions in WordPress
All of our projects are developed on our company’s development domain, protected by a password, connected with a subversion, auto uploading new files to the testing domain etc. Projects are accessible to all coworkers and the client. This kind of development gained our productivity significantly.
Deploying a theme or a new functionality from the development environment to production is another story. Because of the protection on development domain and not knowing where our product will be hosted, we couldn’t use any of the existing solutions for deployment and updating without changing the whole development environment.
The problems I wanted to solve:
- remove manual transfer of new files over FTP
- remove manual backup we did before updating
- have an option of reverting the update
- automatic update when new version of solution is available
- clear view of a changelog and a list of files that were changed in every version
- prevent uploading all the files if only some were changed
- allow updates only to our clients / subscribers
- extremely simple integration to use custom updates
- use WordPress update functionality
- not be dependent on facts where the solution is developed (domain, server, localhost), how development is protected
- client must have an option to install other solutions of ours
I started with a few starting points:
- Implementation of automatic update functionality into new solution should not take more than a line of information to implement
- Have a single plugin for the client that will take care of updating all of our solutions. I really do not want to have repeated functionality.
- Have some kind of overview of all our products and solutions
- Have some kind of licence / product manager for clients
The result of that is, that
when we develop new stuff, we have to:
- Install our plugin named 2repo_host on development website, which serves for packaging our solution for updates we develop on that site
- insert a “line” of code, that register new product / solution for automatic updates
function some_function_name_you_pick( $sources ){
$sources[ __FILE__ ] = ‘http://some-protected-domain-where-you-develop.com’;
return $sources;
}
add_filter( '2repo_plugins', ‘some_function_name_you_pick’ );
On the clients / production website:
- Install our plugin named 2repo
- Input clients credential for automatic updates
And that is all, our solutions and automatic updates are now running and are fully available to our client 🙂
Of course I wouldn’t be myself if 2repo and 2repo_host plugins weren’t also a part of updates where they both serve for self functionality. It is kind of a funny feeling when update functionality is updating itself.
But that’s me 🙂
Let me know of any custom solutions you wrote to optimize your work.
Magical automated way of doing animations – with Stable diffusion with Deforum extension
Let’s explore the magical of doing animations – automated and unpredicable. Yes, you input the text prompt and have general control, but the magical part is, that you let the […]
Stable diffusion AI – high resolution generated art
What is Stable Diffusion AI? Stable Diffusion is a deep learning, text-to-image model released in 2022. It is primarily used to generate detailed images conditioned on text descriptions, though it […]
Tailwind CSS – Dream way of building UI and quick landing pages
This is a quick review and demo of the “utility style CSS framework” named “Tailwindcss” – https://tailwindui.com/ What is Tailwind CSS? Tailwind CSS is a utility-first CSS framework that provides […]
Blender 3D | Best way to start with 3D
It’s been a while since I done 3D stills and animations and 3D Blender seems to be perfect software to start, even if you have zero experience. I have to […]