evertramos / docker-wordpress

Wordpress Docker container using SSL Certificates with LetsEncrypt
https://evertramos.github.io/docker-wordpress/
MIT License
486 stars 155 forks source link

Cannot install themes #3

Closed chuegel closed 6 years ago

chuegel commented 7 years ago

Trying to install some themes from the dashboard and get:

An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.

Any clue what that cause the issue?Thx

evertramos commented 7 years ago

Hard to say despite that message, but please check your permissions, might find the cause.

chuegel commented 7 years ago

Here is a more complete error after enabling debug in WB:

rror occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /var/www/html/wp-includes/update.php on line 502

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-includes/update.php:502) in /var/www/html/wp-includes/option.php on line 837

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-includes/update.php:502) in /var/www/html/wp-includes/option.php on line 838
evertramos commented 6 years ago

@huegelc with this new version it worked just fine installing themes, plugin and activate them. Thanks for your help.

avidsapp commented 6 years ago

With the default configuration I can't upload themes due to 413 Request Entity Too Large. To remedy this, I added a PHP uploads.ini, which is picked up by the WP container. At /usr/local/etc/php/conf.d/uploads.ini in the WP container, it shows:

file_uploads = On
memory_limit = 128M
upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 1800

I also used the USE_NGINX_CONF_FILES=true .env option on the proxy. At /etc/nginx/conf.d/uploadsize.conf in the proxy container it shows:

client_max_body_size 2G;

The theme is ~20MB, but returns a 400 Bad Request. I am able to upload images ~400KB. I have cleared the cache and cookies, but still get this error.

chuegel commented 6 years ago

Maybe because the DNS changed?

Non-authoritative answer:
Name:   api.wordpress.org
Address: 198.143.164.251

Try using the new IP:

extra_hosts:
+           - "api.wordpress.org:198.143.164.251"
avidsapp commented 6 years ago

What do you mean? Where would I add the WordPress IP?

chuegel commented 6 years ago

https://github.com/huegelc/wordpress-docker-letsencrypt/blob/master/docker-compose.yml

evertramos commented 6 years ago

@huegelc

Have you tried to commenting this out #VIRTUAL_PROTO: https?

avidsapp commented 6 years ago

I tried both IPs you listed above. Still returning 400 Bad Request.

chuegel commented 6 years ago

I´ll take a look at this.

avidsapp commented 6 years ago

I'm not sure it is the WP API, as updates to plugins work just fine

chuegel commented 6 years ago

Hmm..I´ve rebuild everything from scratch and I cannot reproduce the issue.

avidsapp commented 6 years ago

I can try rebuilding from scratch as well. Were you able to load themes the size of ~20MB?

avidsapp commented 6 years ago

Just tried on a brand new VPS, with the new proxy files. Still getting 400 Bad Request

avidsapp commented 6 years ago

Ok.... False alarm. Uploading themes works in Chrome, but I was using Firefox. Resolved the issue.