• Resolved BothHands

    (@bothhands)


    I am building my first WP site in an Xampp localhost environment, and am learning more than I wanted to know (ha!). I am not from IT.

    I’m not able to complete the database OPTIMIZATION using the following settings:
    a) Optimize InnoDB tables too [yes]
    b) all tables are UNchecked. No exclusions, so ALL tables are to be OPTIMIZED.

    Three times I have received the following result:

    Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\htcos\wordpress\wp-includes\wp-db.php on line 1877

    Line 1877 is the *second line* in the code excerpt below:
    if ( ! empty( $this->dbh ) && $this->use_mysqli ) {
    $this->result = mysqli_query( $this->dbh, $query );
    } elseif ( ! empty( $this->dbh ) ) {
    $this->result = mysql_query( $query, $this->dbh );

    There appear to be 47 tables in my database. The OPTIMIZATION process halts showing the 15th table optimized: wp_posts

    See screen capture image at this URL:
    https://bothbarrels.net/optimize/fatal-error15.jpg

    I’m not sure how to terminate the OPTIMIZATION operation, so I just log out of WordPress. I hope that is not causing a problem. I let the process run for more than one hour the first time and the progress spinner just kept spinning, but nothing appeared to be happening. When I finally logged outi the optimization results were at table 19…I think.

    Today I tried OPTIMIZING just 4 tables at a time. Then I ran the OPTIMIZATION on the next four tables, and so on until I had OPTIMIZED all 47 tables. It seemed to work.

    Please advise, and please let me know if you need further information.
    Thank you,
    Tom

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor cageehv

    (@cageehv)

    Hi Tom,

    You need to increase the max execution time.

    Here’s how you can do that:
    https://docs.oseems.com/general/application/php/increase-max-execution-time

    Good luck!

    peace,
    Rolf

    Thread Starter BothHands

    (@bothhands)

    Thank you, Rolf ==

    Very, very helpful and of course it worked perfectly.

    For any who are neophytes like me -AND- using Xampp on a local host:
    1. The php.ini file is located here: C:\xampp\php\php.ini
    2. Shut down and RESTART Xampp before you run your next Optimization.

    I have been experimenting offline (localhost) with a framework theme for several months. I make a LOT of page and post revisions, and am amazed at how many your fine plugin removes. I’m learning more about WP all the time, and as I begin to understand about databases I appreciate even more your “Optimize Database after Deleting Revisions” plugin. My site is light and nimble purely as a result of your efforts, Rolf. If not for your plugin, my site would be a GIGANTIC CONFUSING MESS! Ha!

    The only thing I like better than your plugin is your kind, quick and helpful approach to Support.

    Too good, sez I,
    Tom

    Plugin Contributor cageehv

    (@cageehv)

    Hey Tom,

    Thanks for the kudos!
    I’m glad I could help you.

    peace,
    Rolf

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal Error: Maximum execution time…wp-db.php’ is closed to new replies.