How to change PHP settings in wp-config.php, which are normally set in php.ini for a WordPress site. If the customer is unable to upload files larger than 2MB to the WordPress media library or the max upload limit is too small or for any other php.ini settings to be included in wp-config.php.
Related Articles
Enable/Configure Debugging for WordPress
Change php.ini Settings in wp-config.php
IMPORTANT: NGINX servers have a separate timeout time that cannot be adjusted without Root access. For shared NGINX servers the execution time of 30 seconds is the default and can only be adjusted to a maximum of 90 seconds, This is set by the server and cannot be overridden by a PHP INI file. More details on the limit can be found on this status page.
- Log into cPanel
-
Access the document root of the site from File Manager
- From File Manager locate the wp-config.php, right-click and choose Edit, then click Edit again
-
Set any PHP ini value in the wp-config.php file using
@ini_set( 'variable_name' , 'variable_value' );
EXAMPLE: You can set the variables for changing WordPress upload limits to 512M in the wp-config.php file by adding the following above the line that says: "That's all, stop editing!":
@ini_set( 'post_max_size' , '512M' );
@ini_set( 'upload_max_filesize', '512M');NOTE: Local PHP changes can be made with the .user.ini file in the root of your application or website.
Comments
0 comments
Article is closed for comments.