Increasing PHP Upload Limits in Coolify-Hosted WordPress

The simplest approach is to modify the .htaccess file in your WordPress root directory, as this doesn’t require direct php.ini access.

When you deploy WordPress through Coolify, the traditional server file structure is containerized within Docker, which means the php.ini file isn’t in the typical hosting location you might expect. Here are several methods to locate and modify php.ini to increase your post_max_size, upload_max_filesize, etc.:

  1. In Coolify, open your project, go to Terminal, select the WordPress container, and click Connect.
    editing .htaccess.png
  2. Run:
    apt update
    apt install -y nano
    
  3. Navigate to /var/www/html and edit .htaccess with nano:
    nano .htaccess
    
  4. Add:
    php_value upload_max_filesize 256M
    php_value post_max_size 256M
    
  5. Save and exit – no restart needed; changes apply immediately.

Leave a Reply

Your email address will not be published. Required fields are marked *