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.
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.
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 thethemes
folder inwp-content/
on install, possibly because ofskip-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.