Hi I am testing your theme in a Docker container. Have you tried using the theme with Docker?
I'm using the docker-compose example from the docker hub wordpress page.
Here's the docker-compose.yml file:-
wordpress:
image: my-wordpress
links:
- db:mysql
ports:
- 18080:80
db:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: example
And I've built the my-wordpress using a custom Dockerfile:-
FROM wordpress:4.5
COPY config/php.ini /usr/local/etc/php/
docker buid -t my-wordress
config/php.ini:-
memory_limit = "128M"
post_max_size = "32M"
upload_max_filesize = "128M"
max_execution_time = 200
All starts up fine and I can upload the theme through the admin -> them -> upload theme function.
The problem is that the plugins bundled in the advance/plugins directory (and referenced in the plugins-list.php) don't automatically load because WP is trying curl the localhost:18080 port from inside the container. It should be curling localhost:80.
The workaround is to extract them from the zip and upload manually via the admin -> plugins screen.
An example:
A13FATMOON_TPL_PLUGINS.'/revslider.zip'
which resolves to
define('A13FATMOON_TPL_PLUGINS', A13FATMOON_TPL_ADV . '/plugins');
define('A13FATMOON_TPL_ADV', A13FATMOON_TPL_URI . '/advance');
and eventually
define('A13FATMOON_TPL_URI', get_template_directory_uri());
How can I fix this so they load automatically please?
This is also a problem when updating the theme. I had to manually remove the redux-framework plugin (and I believe any settings that may have been overridden), before being able to upload the new bundled plugin after the recent update.
Any other recommendations for the Dockerfile in particular? I'm thinking wp-config.php in particular.
Thanks for any help here.
Comments
I am first time hearing about Docker, so I will rather ask you about help with it :-)
I think you should ask in Docker support about such things as they might have more experience about changing such things.
Sorry for not being helpful.
With kind regards.
Virtualbox we use for testing website on "foreign" browsers.
With kind regards.
So define('A13FATMOON_TPL_URI', get_template_directory_uri()); is returning localhost:18080 in my case, which is the external port mapping (which would be the same if running wp in a virtualbox vm).
Is get_template_directory_uri() a wordpress function?
Any links on how to set up a wordpress development environment would be appreciated. You're the experts
About setting up WordPress I believe you should refer to many nicely made tutorials, as I don't know what exactly do you need. Wordpress Codex has many good articles about such things, like for this case https://codex.wordpress.org/Installing_WordPress
Also more links http://lmgtfy.com/?q=setting+up+wordpress+development+environment ;-)
Hope this will help you some.
With kind regards.
It could also be JavaScript issue so check in console(F12 key in your browser)
With kind regards.
With kind regards.
With kind regards.
I have now confirmed this works both in the Docker and the roots Trellis/Bedrock base installation.
I'll be moving forward with the roots Trellis/Bedrock base install since it gives me valuable features out of the box and allows me to move to a staging/production server with appropriate security, mail and configuration.
Check it out.