max_execution_time is set to 60 which is too low

HI, I get the following error when trying to run my WordPress backup:

max_execution_time is set to 60 which is too low. A minimum execution time of 150 seconds is recommended to give the migration process the best chance of succeeding. If you use a managed host, contact them directly to have it updated.

TIA, Kr

Gem

  • Predrag Dubajic
    • Support

    Hi Gem,

    Hope you’re doing well today :slight_smile:

    You will need to increase your maximum execution time so that Snapshot has time to process your files and create a backup file.

    You can check this guide here on how to increase the execution time:

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

    If you’re still having issues with increasing it then it would be best to get in touch with your hosting provider and they should be able to make this change for you in not time.

    Best regards,

    Predrag

  • Lindeni Mahlalela
    • Recruit

    Hello Gem

    I hope you don’t mind me chiming in here. As I was working on the Ultimate Branding issue you reported I ended up increasing the timeout limit for you while I was increasing the memory limit.

    I have added the following two lines in your wp-config.php file:

    define("WP_MAX_MEMORY_LIMIT", "512M");
    @ini_set("max_execution_time", 180);

    I noticed that there are some attempts to achieve this through php.ini and it seems the server is ignoring these, so in addition to what’s recommended in the docs shared by my colleague Predrag, you can also increase the max_execution_time by adding the following line in the wp-config.php file:

    @ini_set("max_execution_time", 180);

    This line sets it to 180 but you can set it as high as you like by changing the value. You can always check with your host about the recommended maximum, just make sure you at least meet Snapshot’s recommended minimum, but it is always better to set it to a much higher value than the recommended minimum.

    I hope this helps, please let us know if you need any further assistance. I know I have worked on two separate tickets at the same time but please keep your replies separate for each of your tickets, that will make it easier for us and other members to follow up on these issues.

    Have a nice day.

    Mahlamusa

  • Gem
    • Design Lord, Child of Thor

    Oh Hi, thank you so much for your hard work, I can’t tell you how much I appreciate it, so can you confirm what my memory is now? can you run a report that shows I have more than 67mbr? I have spent all day trying to find a way to get around this problem and Fastshosts we not very keen to help they just told me we were on old shared servers which were capped at 64meg I think you might just have made my year :smiley:

  • JMorris
    • I do geek stuff

    Hello Gem,

    As discussed in chat, I’m marking this ticket as resolved now. I’ve made some minor adjustments to Mahlamusa’s defines above. Here’s the final version:

    // Performance Enhancements
    ini_set("memory_limit","2048M");
    ini_set("max_execution_time","600");
    // Increase WP Memory Limit
    define('WP_MAX_MEMORY_LIMIT', '2048M');
    // Increase WP Memory Limit
    define('WP_MEMORY_LIMIT', '2048M');

    Your site now hows 2048M (2G) of memory available. Your execution time is now set to 600. You shouldn’t have any further issues related to these as these are very generous settings. Your site is performing very fast now.

    Best regards,

    James Morris