Report this

What is the reason for this report?

Is it possible to manipulate Wordpress child theme on my remote DO server via Terminal? I want to include version control using Git.

Posted on October 19, 2020

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!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
0

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:

  1. 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:

  1. cd /var/www/yoursite.com/wp-content/themes/your-child-theme

And run the git init in there.

Hope that this helps! Regards, Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.