Knowledge Base
KamlatechToolBlogContact Us
  • Kamlatech Documentation
  • Magento
    • Installation
    • Email Configuration
  • Blogger
    • Adding Code Block
  • Linux
    • Managing Logs
    • Prevent Package Update
  • Node
    • Installation
    • Http-Server
  • Github
    • .gitignore
    • Branch to New Repo
  • HTML
    • Common Header & Footer in HTML
  • Linkedin Infographics
    • Flame Retardant Standards
    • Flame Retardant Terms
  • Music
    • Pandit Niladri Kumar - Sitar
  • Applications
    • Konvect Connect
    • Konvect Fetcher
    • Konvect Fetcher WebApp
  • HTTPS SSL Certificate
    • Lets's Encrypt
  • Oracle Cloud Instance
    • Firewall
    • CPU Stressing
    • CPU Stressing Docker
  • SFTP
    • WinSCP SFTP
  • NextCloud
    • Installation
    • Post Install Tweak
    • PHP Version
  • Wordpress
    • NGINX Configuration
    • Image upload / Crop issue
    • Required PHP Modules
    • PHP Configuration
  • Healthcare Wearables (Cardiac)
    • Wearable ECG
    • Arrhythmia
    • Ambulatory ECG Usecase
    • Understanding EKG Leads
  • Flutter
    • Direct URL Access
    • Change Android PackageName
  • Math
    • Online Equation Writing
  • Backend Web Service
    • Flask App Deployment
  • 3D Modeling
    • DWG in Solid Edge
  • MariaDB
    • MariaDB Commands
  • Excel
    • HTML as String in Excel
  • Tools
    • Online Tools
  • PostgreSQL
    • PostgreSQL Installation
  • MEDUSA
    • Medusa Installation
    • Backend Server/Worker Mode
    • Frontend Deployment
  • Jupyter Lab
    • Jupyter Web App
  • WooCommerce
    • Product Filename Renaming
  • Embedded
    • Flash Xiao Sense Bootloader
Powered by GitBook
On this page
Edit on GitHub
  1. Wordpress

PHP Configuration

For certain plugins to work and uploading large files in WordPress sites, you may need to change the following setting in php.ini file.

Please use the PHP version folder as per the PHP used or installed by you. In this example, it's version 8.3.

sudo nano /etc/php/8.3/cli/php.ini

Change the following parameters as it suits your installation

memory_limit = 512M
max_execution_time = 900
max_input_time = 900
post_max_size = 256M
upload_max_filesize = 720M

Here are the default config if you want to revert

memory_limit = 128M
max_execution_time = 30
max_input_time = 60
post_max_size = 8M
upload_max_filesize = 2M

In some cases, a plugin upload might be blocked by nginx server. To overcome this, we need to amend the nginx site specific config file

sudo nano /etc/nginx/sites-available/mysite

Add the following line in server block

client_max_body_size 100M;

The config file should look like this

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name example.com;

    ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;

    // This allows larger file uploads upto 100M
    client_max_body_size 100M;
    
    root /var/www/example;
    index index.php;
    
    .......
 }
PreviousRequired PHP ModulesNextWearable ECG

Last updated 11 months ago