• Resolved elkrat

    (@elkrat)


    I have a lot of cPanel sites and many are older. I’m using a shell script, below, in case it helps someone. The plugin says “Error: No tables are eligible to enable.”

    Am I able to upgrade the tables with this plugin, even if that were to require two sequential commands?

    Thanks so much for you efforts with this plugin and the other one. It really speeds up my older sites.

    #!/bin/bash
    
    declare -a arr=(
    "account1"
    "account2"
                    )
    
    for i in "${arr[@]}"
    do
       echo _______________________________________________________________________________
       echo "**** $i ****"
       cd /home/"$i"/www
       wp plugin install index-wp-mysql-for-speed --allow-root --activate
       wp index-mysql enable --all --allow-root
       echo _______________________________________________________________________________
       echo ""
       echo ""
    
    
       # or do whatever with individual element of the array
    done
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author OllieJones

    (@olliejones)

    Thanks for the shell script! I hope it helps other people.

    That “no tables are eligible to upgrade” message means that all tables are already upgraded. I guess it should not be an error message, but a warning or informational message. Thanks for the feedback. I’ll change it.

    Plugin Author OllieJones

    (@olliejones)

    https://github.com/OllieJones/index-wp-mysql-for-speed/issues/76

    Also, on Ubuntu Linux you can say

    sudo -u www-data wp index-mysql enable --all

    and so avoid using root to run that stuff. Works for all kinds of wp commands that need access to the www-data webserver files.

    Thread Starter elkrat

    (@elkrat)

    I believe no tables were eligible because they were MyISAM. After initially running the shell script and getting the error message, I went into the website in question and the plugin was installed and enabled. I used the plugin only to convert the tables and then ran the shell script again, with success.

    Thanks for the tidbit on user switching!

    • This reply was modified 1 year ago by elkrat.
    • This reply was modified 1 year ago by elkrat.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Upgrading Tables with WP-CLI’ is closed to new replies.