WordPress plugins Install/Update timeout

I have been installing/updating my self-hosted WordPress themes/plugins through FTP. ie get the link from my wordpress site, go download the plugin from wordpress.org, upload from my comp to the site through FTP.

I want to be able to update it through the wp admin interface instead, but it seems to timeout and the page just stops loading after a while. I can see half the files uploaded successfully through FTP. Is there a way around this?

Read More

Here is an example of what is shown on the screen:

Installing Theme: DMS 1.0.3.6 Downloading install package from
https://wordpress.org/themes/download/dms.1.0.3.6.zip…

Unpacking the package…

Installing the theme…

1) I have added the WP_MEMORY_LIMIT in wp-config.php file with

define(‘WP_MEMORY_LIMIT’, ‘100M’);

Nothing happens.

2) I have added set_time_limit() to wp-config.php file

set_time_limit() 

and this error occured

Warning: set_time_limit() has been disabled for security reasons in
/home/**/public_html/wp-config.php on line 83

3) I tried editing the .htaccess file, but that breaks the whole workpress installation and I end up seeing an error page instead.

AddType x-mapp-php5 .php
php_value upload_max_filesize 100M 
php_value post_max_size 100M
php_value memory_limit 100M

How can I install/update my plugins directly through the WordPress User Interface? Is there a way around the timeout?

My webhost is www.000webhost.com btw.

Related posts

Leave a Reply

4 comments

  1. I ended up editing the ...wp_includesclass-http.php file.

    Around line 1250 (depending on your version), look for the line that reads:

    $theResponse = curl_exec( $handle );

    and change it to read:

    $timelimit = ini_get('max_execution_time');
    set_time_limit(900);
    $theResponse = curl_exec( $handle );
    set_time_limit(max($timelimit, 30));
    

    This stores the current timeout in a variable, sets the new timeout to 900 seconds (5 minutes should be plenty for most connections), then it performs the request, and resets the timeout to what ever it was before we began.

    That has worked for me in the past.
    NB: v3.8.2 uses another asynchronous method to perform installs and if you’re on windows, you might need to set some additional security permissions etc. to get it all working properly.

    Cheers.

  2. sometimes updating plugins can ‘break’ your site, the only way to fix is to go back to your ftp folder and disable the plugins – (rename the folder temporarily ought to do it) – then when you can see your site again, try enabling the folder again and activating your plugins one by one,

  3. If someone desires to bypass WP Update Check Timeout use this (add inside init hook):

    delete_site_transient( 'update_plugins' );
    wp_cache_delete( 'plugins', 'plugins' );
    

    After use, you can remove of course.
    🙂