share themes across server NON WordPress MU a

I am trying to find a way to share themes across multiple separate installs of WordPress across our servers.

I know how to setup a symlink – but thinking that uploads and things like that might be an issue otherwise.

How can I share themes across a cpanel server

For typo3 I simply do a symlink to /usr/bin/foldername

But for wordpress I noticed users had some issues

  • aecnu
    • WP Unicorn

    Greetings cloudhopping,

    Thank you for the great question and due to the cross domain issues plus the way you mentioned using symlinks which affects other security features of servers themselves – I know of no way that this can be done and of course this is not intended use by any imagination of the word.

    Thank you for being a WPMU DEV Community Member!

    Cheers, Joe

  • Connectivity.Engineer
    • Design Lord, Child of Thor

    With Drupal and Typo3 we simply point to a shared source.

    For example – /usr/bin/* is shared as READ / RUN only on a cpanel system.

    We went a step further and placed /usr/bin/typo3sharedsource and /usr/bin/drupalsharedsource but have them coming in as an NFS Read only mount.

    So for us to make a change there – we must first login to the NFS server and publish updates –

    read only is exactly that – and its secure.

    Ton’s of Drupal and Typo3 web hosting firms have been doing this for years (on different flavors of server systems including cpanel.)

    I guess another question would be – is there a way to convert themes easily to have all the files point to 1 URL

    For example loading the same theme across 1000+ sites is kinda silly –

    but if we could have that site point to a central repository for CDN purposes as an example – it would be much nicer.

    I would love to find a way to have all the images (unless a customer uploads them perhaps ) to

  • Connectivity.Engineer
    • Design Lord, Child of Thor

    OK – so let’s assume I might be fine with permissions as READ ONLY

    If I set in wp-config for the individual sites

    define( ‘UPLOADS’, ‘/home/user/public_html/uploads’ );

    define(‘WP_CONTENT_DIR’, ‘/usr/bin/wpsharedsource/wp-content’:wink:;

    and I am thinking I could do the same with Plugins as well:

    define(‘WP_PLUGIN_DIR’, ‘/usr/bin/wpsharedsource/sharedplugins’:wink:;

    We do not expect clients to upload their own plugins and/or their own themes – as we are limiting that fuctionality anyhow –

    So back to the original question – would that work ? with those being on an NFS Read Only Mount?

  • aecnu
    • WP Unicorn

    Greetings cloudhopping,

    Aha! Drupal. Not familiar with it and used to the business class CentOS OS.

    Thank you for your additional input and I do not quite know what to tell you since all of this is not only unintended use but also beyond the scope of the support that we provide here.

    However, in an attempt to be helpful or get some clarification I will see if I can get one of the lead developers/coders in here with his invaluable insight for his advice/advise for us.

    Though this may take a bit longer then a normal ticket, I will try to get him in here asap.

    Cheers, Joe

  • Aaron
    • CTO

    You can change the wp content location, though you’ll have to be careful about permissions. Also that would share uploads dir. And some plugin or themes may be poorly written and hardcoded the location, very common.

    For our similar setups, we use a svn repo, and an rsync to all servers triggered by a post commit hook.

  • Connectivity.Engineer
    • Design Lord, Child of Thor

    The themes are the ones we got from WPMUDEV with our membership.

    I want to share around 70 or so templates with individual installs

    and we will have roughly 500+ of those within a month of doing this – and expect that to climb quite a bit.

    Being able to update each quickly is a beast on itself – but if they are all in 1 location it makes life much easier.

    Interested in the SVN approach – but hoping that instead of bloat on each install setting to a central location would make more sense.

    I mentioned Drupal and Typo3 simply because we do this already on those platforms and it works very well.

    I cannot imagine that with 1 out of ever 6 websites now using WordPress that this has not been done.

    Sadly the only thing keeping us from using WordPress MU is the fact that each client needs integration into email – and the ability to add/delete email accounts (as well as our billing panel not having an API 100% for wpmu yet called hostbillapp)

  • Connectivity.Engineer
    • Design Lord, Child of Thor

    Aaron – you stated:

    “You can change the wp content location, though you’ll have to be careful about permissions. Also that would share uploads dir.”

    Can they not point to different locations?

    via define( ‘UPLOADS’, ‘/home/user/public_html/uploads’ );

    I am thinking we could do the same with the users plugins

    while having the wp-content source point here:

    define(‘WP_CONTENT_DIR’, ‘/usr/bin/wpsharedsource/wp-content’:wink:;

    One thing that might have some folks confused is that on a cPanel server Anything in the /usr/bin/* directory is able to be READ by the nobody user (which is what apache runs as) but cannot be written to

    So pointing there might actually work…

    I have a test bench that I will begin testing this stuff — however would love your advice on the svn options and perhaps how we could maybe convert the themes from WPMUDEV over to use a CDN that we have.

    In short – we have nginx + varnish running on multiple systems around the US / Canada and also in Europe Australia as well as in Asia –

    Since we have this setup working for the other applications – using it for this just makes sense.

    I am wondering if a simple rewrite from apache might work…

    In regards to this being out of the scope of support – thanks for your pointers – I am excited to see WPMUDEV helping over and above that normal level

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.