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:
-
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).
-
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).
-
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?
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
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.
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.