DEV Community

Samuel Nitsche
Samuel Nitsche

Posted on

How to get started with WordPress Theme development

Hey WordPress development folks,
I'm mainly a backend and database developer and the last time I dealt with PHP was roughly 7-10 years ago.
I want to do a bit of WordPress Theme development in my free time and wonder how to best start with that (mainly tooling wise)

I'm especially looking for tooling that helps with the following things I don't want to miss (not even for a side/hobby project - for I will have big pauses in-between development, automation is most important to not forget that stuff):

  • automated creation and spin-up of a local wordpress installation (including certain plugins)
  • ideally: automated way to get a specific state of content into the local installation (like an export from production)
  • automated deployment of my theme-under-construction to my local dev or a production installation
  • file structure/layout to allow useful version-control of the important stuff via git

I appreciate any links/tutorials/experiences you are willing to share :)

Oldest comments (10)

Collapse
 
txndai profile image
GT Fari

css-tricks.com/where-to-learn-word...

I found this to be a helpful place to start

Collapse
 
keralpatel profile image
Keral. Patel.

I don't think that there's any other better way to get started than reverse engineering an existing theme and playing with it's code to understand the structure.

There are many free/gpl licensed themes out there. You can get started with those very easily.

Collapse
 
pesse profile image
Samuel Nitsche

Thanks for the encouraging words.
The coding is not the problem, the tooling around the development is what I'm looking for guidance ☺️

Collapse
 
sumitpathak1 profile image
Sumit Pathak

I think this might be helpful udemy.com/share/101YBi/

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

Although you can indeed install WordPress within a folder, then run globally, I would love to run it within Docker. (which is not WordPress problem, but PHP problem.)

I believe there is WordPress plugin to view that website's source code including PHP.

Also, if you want to use composer, I believe there is WordPress fork. Forgot the name, sry.

Collapse
 
pesse profile image
Samuel Nitsche

Hm, I tried out that one here yesterday and it seemed to work pretty okay. The only thing I need to add is to make the wordpress folder also a volume so I can access it easily from my PC:
docs.docker.com/compose/wordpress/

Collapse
 
polyrenn profile image
Niyi

roots.io/sage/ Might be a good fit. Comes bundled with webpack and browsersync, all you'll need to automate your workflow. I think a couple starter themes in there as well if you look around the site.

Collapse
 
katiekodes profile image
Katie

Bookmarked because I'm in the same boat as you (though leaning towards moving from WP to SSG development because some of the "coding" is so much simpler).

That said, I wouldn't dive into Wordpress these days without learning about writing Gutenberg blocks to better control the CMS look and feel itself.

I feel like just developing themes might be a little bit of an old-school mindset?

Collapse
 
pesse profile image
Samuel Nitsche

What is SSG?
WordPress is a precondition for my use-case, because of the many very good PlugIns for interactive stuff (booking, calendar etc.)
Not going to work as WordPress developer, so I might have a different situation :)

Collapse
 
katiekodes profile image
Katie • Edited

A static site generator.

I'm not sure I'm going to need so many plug-ins for my next project if I choose the right SSG and CMS combo. Just a couple of for loops surrounding HTML blocks here and there.

Not to send you down a rabbit hole...