Wordpress Docker won"t increase upload limit
🚀 Dockerized Wordpress: How to Increase Upload Limit
Are you facing frustration trying to increase the upload limit of your Dockerized Wordpress instance? 😫 Don't worry, you're not alone! Many users encounter this common issue, but luckily, there are easy solutions available. In this guide, we'll walk you through the process step-by-step to help you increase the upload limit hassle-free. Let's get started! 💪
Common Issue
One of the common issues users face when trying to increase the upload limit is receiving the following error message:
[filename] exceeds the maximum upload size for this site.
Even when attaching the uploads.ini
file to your Dockerized Wordpress instance, the upload limit doesn't seem to increase. Let's explore how to address this issue and find a suitable solution.
Solution
To increase the upload limit of your Dockerized Wordpress instance, follow these simple steps:
Open your
docker-compose.yml
file.Locate the
volumes
section under thewordpress
service and add the following line:
- ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
Your docker-compose.yml
file should now look like this:
version: '2'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: password1
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: password1
wordpress:
depends_on:
- db
build: ./wordpress
ports:
- "8085:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_PASSWORD: password1
volumes:
- ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
volumes:
db_data:
Now, create an
uploads.ini
file in the same directory as yourdocker-compose.yml
file, and add the following lines to increase the upload limit:
file_uploads = On
memory_limit = 500M
upload_max_filesize = 500M
post_max_size = 500M
max_execution_time = 600
Make sure to customize the values according to your requirements.
Save the
uploads.ini
file.Restart your Dockerized Wordpress instance using the following command in your terminal:
docker-compose restart
That's it! Your upload limit should now be increased successfully. 🎉
Call to Action
We hope this guide helped you successfully increase the upload limit of your Dockerized Wordpress instance. If you have any further questions or need assistance, feel free to leave a comment below. We're here to help! 😊
And don't forget to share this guide with others who might find it useful. Sharing is caring! 💌