2

So i have a WordPress-based site with a custom Genesis child theme. Once the site goes live, we are obviously going to need to make changes periodically to the child theme's code — modifying CSS and similar. These are the problems i've run into:

  1. I don't have shell or FTP access, so i can't just replace the files on the server (they wanted to use one of those dedicated WordPress hosting providers for security and ease of maintenance).

  2. It's not possible to upgrade an active theme 'in place' when using the Web-based Upload functionality (you can only do this with themes installed via WordPress's repository thing).

  3. To get around the above limitation, i thought maybe i'll just put the git revision hash or whatever in the theme name each time i build the zip file, which will make WordPress see it as a separate theme, and then i can just switch from the old one to the new one. This does work, except that it causes WordPress to reset some of its settings (in particular, which menu is set as the 'Navigation Bar').

To be clear, i am NOT asking how i can test/see changes before making them in production (i have a development server), my issue is specifically with the mechanism of making the change.

Given my circumstances, is there any way to do this without causing interruption / having to make configuration changes each time we update?

  • 4
    I know this is a little snarky and unhelpful but in your shoes I would go to host and ask how do they suggest to work around their silly restrictions. It's supposed to "ease" maintenance for you, let them tell you how. :) – Rarst Mar 10 '14 at 21:21
  • I'm sure their response would be to upgrade to their most expensive 'plan' (that includes shell access), which my company are certainly not going to do. :/ – kine Mar 10 '14 at 21:39
  • 2
    It sounds like there is no "ease of maintenance" to be had and I'd be suspicious of the "security" too-- I don't trust black boxes. – s_ha_dum Mar 10 '14 at 21:48
1

I think i'm going to answer my own question:

My problem #1 (no direct server access) is probably what makes this situation the most irritating; had that not been an issue, i think there would be a lot of additional options open to me.

But given that limitation, creating and uploading 'new' themes seems to be the best choice. Accepting that, the question becomes, how to solve the problem i mentioned in #2?

The answer seems to be:

This problem is a limitation of WordPress itself (tracker # 18588) that will likely be remedied in a future version. Until then, there is a programmatic work-around, provided by a user in the linked ticket (and also here on Stack Exchange), that can be used to transfer the settings between themes when the switch occurs. Having adapted that code to my own theme, i've found that the work-around is sufficient for my use case.

cheers

  • Well done on solving this! You can accept your own answer too :) – Tim Malone Aug 10 '16 at 21:15
0

In this case I would create a new theme.

But be careful with live updating, this could turn into cowboy coding. Make your change on localhost and then upload your new theme as zip file through administration and activate it.

It would be the exact copy of the former theme but with modification.

  • 1
    Like, i thought of that, as my #2 states. The problem is that WordPress's 'theme locations' settings (various dynamic/widgetised areas, including the main navigation bar that appears on every page) are theme-specific. It's obviously not ideal if all of the dynamic menus disappear from the site every time we update. – kine Mar 10 '14 at 22:02
-1

I would advice you have a live copy of your website on your local host, update it on the local host and them move then to the live host during the least active time.

If your link is fast, it is something that can be done within one minute.

  • This doesn't really answer the question. If you read it, the OP is asking how to move it under the restrictions in place. – Tim Malone Aug 10 '16 at 21:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.