Archived topic
Centralized management of files called by several GP-installations
7 replies · Started by Walter Schwarz on May 19, 2022
To just manage css-files at one location centralized to use these in several GP-installations I insert the following @import-links.
/*
Theme Name: GeneratePress Child
Theme URI: https://generatepress.com
Description: Default GeneratePress child theme
Author: Tom Usborne
Author URI: https://tomusborne.com
Template: generatepress
Version: 0.1
*/
@import url(https://xyz.de/gp-child/master.css);
@import url(https://xyz.de/gp-child/design.css);
For sure it is not really elegant. Is there a better solution to manage css-files stored in the path "/var/www/vhosts/xyz.de/httpdocs/wp-content/themes/generatepress_child" and have them linked via @import just once in every style.css of every GP-installation?
What about individual php-files like content-page.php, functions.php and others? Any idea to just manage these at one location and have them linked anyhow?
Manually importing these at every GP-installation is no solution - this would result in confusing update attempts and conflicts in version management.
Thank you for any idea to realize centralized file management,
Walter
Hi there,
you may want to consider using GitHub for you repository. And then use a service or plugin to Push any changes to your WP installs.
Found some info in the article:
https://wpmudev.com/blog/syncing-git-wordpress/
The WP Pusher plugin looks interesting.
Thank you David for the hint.
Unfortunately I have no experience with github and the like. But I'll figure it out.
I would prefer a solution on my provider's server and putting links on it. I want to keep my dependencies low.
WP Pusher would be fine, if it would transmit files from one GP installation to others ...
Many thanks again - and maybe there are other solutions,
Walter
Apart from WP Multisite installs i don't think there is a way to 'centralize' template files. You might want to ask on our FB group to see if any smart person has an idea :)
Looks like I have found a solution using SymLinks (Hard Link).
I will see if it's practical and stable.
Thanks,
Walter
Awesome - glad to hear that!
Up to now symlinks/hard links seem to work - thanks to having server access to the root.
But I have to handly carefully file modification ...
Thank you,
Walter
Thats great to hear ... thanks for taking the time to feedback!