More
    HomeDesign / DevIncrease Timeout for Slow Server

    Increase Timeout for Slow Server

    It is already known that WordPress has built-in auto download and install feature. It is very convenient to have. However, for some reasons, we might be facing error timeout. WordPress do not manage to get updated automatically, or not happening at all. One problem might because of slow server.

    There is one way to solve it. Follow this steps..

    • By default, WordPress has pre-configured its own timeout settings, which might be different on each version. This hack should only be applied only if you have problems with auto-upgrading wordpress.
    • Open the wp-admin/includes/file.php file and find this line below:

      [sourcecode language=’php’]

      - Advertisement -

      $response = wp_remote_get($url, array(‘timeout’ => 60));

      [/sourcecode]

    • To increase downloading or timeout time, simple change the value to greater value (double value for example).

      [sourcecode language=’php’]

      $response = wp_remote_get($url, array(‘timeout’ => 120));

      - Advertisement -

      [/sourcecode]

    By doing this, it will allow more time for downloading and auto-upgrading the wordpress installation.

    - Advertisement -
    WPTidBits
    WPTidBitshttps://wptidbits.com/
    Owner of WPTidBits. Totally in love with WordPress!

    LEAVE A REPLY

    Please enter your comment!
    Please enter your name here

    110FansLike
    761FollowersFollow