visiblevc / wordpress-starter

A slightly less shitty wordpress development workflow
688 stars 167 forks source link

fix: themes folder #172

Closed jiverson closed 4 years ago

jiverson commented 4 years ago

So I am no expert in wordpress nor a bash expert.

Two things to note was that I did not add a theme with THEMES in the [theme.slug] parameter and I also did not add a custom theme with plugins.

My docker-compose.yml looked exactly like the example.

What I found out is though after install, no default theme was applied, which from what I could tell was suppose to fallback to twentytwenty. But even after logging into wp-admin I could not install any themes. The error was something along the lines of the folder could not be created.

I thought maybe it was my db so I switched to mysql which then would not initialize (obviously I had local mysql already using that port https://github.com/visiblevc/wordpress-starter/pull/171).

As far as I can tell wp cli does not create the themes folder in wp-content/ on install, possibly because of skip-content? Because of that the if statement would never install the default theme.

It just seems to me that the themes folder needs to be created with possibly the right permissions? I am not 100% sure but this does the fix the issue, feel free to reject if you find a better way.

The fix was to add another check to see if the app/wp-content/themes directory does not exist at fallback to the default theme.

jiverson commented 4 years ago

Sounds good to me thanks for the quick feedback.