By katovonkatz
I want to manipulate my Wordpress child theme (https://developer.wordpress.org/themes/advanced-topics/child-themes/), but I want to keep track of the versions. I recently learned about version control in Git and so my ideal situation would be if I could do this via my Mac Terminal on the DO server.
I know how to manipulate the child theme in the Wordpress wp-admin area itself, but is there anyway that I can do it directly on the DO server so that I can use the benefits of Git?
Is there another way that you recommend how I do this?
I have installed Ubuntu 20.04 with a LAMP stack.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hey @katovonkatz,
Yes, that is doable, I actually do the same thing at my end.
There are two possibilities, you could either add your whole WordPress site to git or just the child theme.
To do so you need to first SSH to the Droplet and then using the cd command go to the webroot of your website:
- cd /var/www/yoursite.com
In there you could use the git init command to start a new project. That way your whole WordPress site would be tracked.
Or if you want specifically to track your theme, you could cd directly into the child’s theme directory:
- cd /var/www/yoursite.com/wp-content/themes/your-child-theme
And run the git init in there.
Hope that this helps! Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.