Home Forums Themes Support How to change PHP INI settings of WordPress

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #3064

    Hi all customer,

    In this topic tutorial we’ll introduce some way to help you change PHP settings of your server to make all functions of WordPress working fine as Demo Importer,…

    When you use sharing hosting, it have many limitation and make some functions of WordPress doesn’t work. In this case you need change PHP Configuration Limits. Almost case you need change settings of PHP like this:

    • Max_execution_time: 180
    • Memory_limit: 128M
    • Post_max_size: 32M
    • Upload_max_filesize: 32M

    Have some ways to change these settings.

    0. The easiest method (not the best): use this plugin to change PHP settings direct in WordPress admin dashboard:

    Custom PHP Settings

    0. The Best method: The best way if you can access cPanel but it will depend on your hosting Provider. We’ll use example here and maybe it will different on your hosting.

    If you are running on a host that uses cPanel, you can easily change this from the UI. Under Software click on “Select PHP Version

    Click on “Switch to PHP Options

    You can then click on each property and change its value. Then click on “Save

    1. Method 1: Edit file wp-config.php or functions.php and add these code:

    @ini_set( 'max_execution_time', '180' );
    @ini_set( 'memory_limit', '128M' );
    @ini_set( 'post_max_size', '32M');
    @ini_set( 'upload_max_size' , '32M' );

    2. Method 2: Create or Edit .htaccess file and add these code:

    php_value max_execution_time 180
    php_value memory_limit 128M
    php_value post_max_size 32M
    php_value upload_max_filesize 32M

    If you get an “internal server error” message with the method above it is most likely your server is running PHP in “CGI mode,” which means you can’t use the above commands in your .htaccess file.

    3. Method 3: Create a file php.ini in the root of your WordPress sour code and add these code:

    max_execution_time: 180
    memory_limit: 128M
    post_max_size: 32M
    upload_max_filesize: 32M

    Reference resource:

    https://www.wpbeginner.com/wp-tutorials/how-to-increase-the-maximum-file-upload-size-in-wordpress/

    https://codex.wordpress.org/Common_WordPress_Errors#Maximum_execution_time_exceeded

    Hope this help you all can easy change PHP settings of your server to make your site work fine!

     

    *****

    Best regards,

    HaruTheme

    • This topic was modified 2 years, 1 month ago by admin.
    • This topic was modified 2 years, 1 month ago by admin.
    • This topic was modified 2 years, 1 month ago by admin.
    • This topic was modified 2 years, 1 month ago by admin.
    • This topic was modified 1 year, 9 months ago by admin.
    • This topic was modified 1 year, 9 months ago by admin.
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.