Completely Uninstall Wordpress Toolkit including users
Today's cPanel update included the Wordpress Toolkit. After looking at it we decided we don't want it because it forces our users to pay for premium features to get all the benefits. So I disabled it in Features for our users. But now I see that every single account has the below 'WP_AUTO_UPDATE_CORE' line at the top of their wp-config.php files, placed there by Wordpress Toolkit. First, I resent the fact that a program would alter all of our user's files without any warning. So now I need to safely remove this line from hundreds of Wordpress installations. Is there a way to do this? I am aware of the following command, but I assume this will only remove the toolkit RPM, correct?
>rpm -e wp-toolkit-cpanel
So how do I safely remove the following line from hundreds of users' wp-config.php file? This just irks me to no end that I have to do this.
define('WP_AUTO_UPDATE_CORE', 'minor');// This setting is required to make sure that WordPress updates can be properly managed in WordPress Toolkit. Remove this line if this WordPress website is not managed by WordPress Toolkit anymore.
-
Do you have WordPress Manager installed at that machine?
I don't see it anywhere, ? this was an fresh install in feb with 102 and Ubuntu0 -
Do you have WordPress Manager installed at that machine?
sent you a PM0 -
Do you have WordPress Manager installed at that machine?
@cPRex here is the ticket #94426778 thanks :)0 -
Thanks - I'm following along now. 0 -
Thanks - I'm following along now.
@cPRex OK we got the answer below and case ID DOC-17759 The WordPress Toolkit was being reinstalled on your server due to a cron job that was still present on your server. This cron job runs at 1AM every day, and performs a reinstall of the WordPress Toolkit if required. You can see here in the logs that this cron ran on your server on both the 16th and 17th of March: --Mar 16 01:00:01 server2 CRON[40375]: (root) CMD (sleep $((1 + RANDOM % 5))h $((1 + RANDOM % 60))m; /usr/local/bin/wp-toolkit update-configuration > /dev/null 2> /dev/null || /usr/local/cpanel/3rdparty/wp-toolkit/bin/wp-toolkit-installer.sh --generate-configs > /dev/null 2> /dev/null; DEBIAN_FRONTEND=noninteractive LANG=C /usr/bin/apt-get --assume-yes --no-reinstall -o Dpkg::Options::="--force-confnew" install "wp-toolkit-cpanel" > /dev/null 2> /dev/null)
--Mar 17 01:00:01 server2 CRON[11372]: (root) CMD (sleep $((1 + RANDOM % 5))h $((1 + RANDOM % 60))m; /usr/local/bin/wp-toolkit update-configuration > /dev/null 2> /dev/null || /usr/local/cpanel/3rdparty/wp-toolkit/bin/wp-toolkit-installer.sh --generate-configs > /dev/null 2> /dev/null; DEBIAN_FRONTEND=noninteractive LANG=C /usr/bin/apt-get --assume-yes --no-reinstall -o Dpkg::Options::="--force-confnew" install "wp-toolkit-cpanel" > /dev/null 2> /dev/null)
-- The "sleep" command at the beginning of this gives an offset to this command, but this eventually ran forcing WordPress Toolkit to be installed: --[19:08:17 server2 root@94426778 ~]cPs# grep -i -B1 wp-toolkit /var/log/apt/history.log Start-Date: 2022-03-05 02:01:18 Commandline: /usr/bin/apt-get --assume-yes --no-reinstall -o Dpkg::Options::=--force-confnew install wp-toolkit-cpanel Upgrade: wp-toolkit-cpanel:amd64 (5.9.2-3345, 5.9.3-3400) -- Start-Date: 2022-03-15 05:58:08 Commandline: apt remove wp-toolkit-cpanel Remove: wp-toolkit-cpanel:amd64 (5.9.3-3400) -- Start-Date: 2022-03-16 02:01:10 Commandline: /usr/bin/apt-get --assume-yes --no-reinstall -o Dpkg::Options::=--force-confnew install wp-toolkit-cpanel Install: plesk-libboost-date-time1.65:amd64 (1.65.1-ubuntu.20.04.200630.1129, automatic), plesk-libboost-1.65:amd64 (1.65.1-ubuntu.20.04.200630.1129, automatic), plesk-libboost-thread1.65:amd64 (1.65.1-ubuntu.20.04.200630.1129, automatic), plesk-libboost-serialization1.65:amd64 (1.65.1-ubuntu.20.04.200630.1129, automatic), libaps:amd64 (1.0.10-ubuntu.20.04.200904.1939, automatic), plesk-libboost-system1.65:amd64 (1.65.1-ubuntu.20.04.200630.1129, automatic), wp-toolkit-cpanel:amd64 (5.9.3-3400), sw-engine:amd64 (2.30.1-ubuntu.20.04.200904.1939, automatic), plesk-libstdc++6.3.0:amd64 (6.3.0-ubuntu.20.04.200630.1040, automatic), plesk-libboost-program-options1.65:amd64 (1.65.1-ubuntu.20.04.200630.1129, automatic), plesk-libboost-filesystem1.65:amd64 (1.65.1-ubuntu.20.04.200630.1129, automatic), plesk-lmlib:amd64 (0.2.4-ubuntu.20.04.200904.1939, automatic), plesk-libpoco-1.9.0:amd64 (1.9.0-ubuntu.20.04.200904.1939, automatic), plesk-libboost-regex1.65:amd64 (1.65.1-ubuntu.20.04.200630.1129, automatic), libxmlrpc-core-c3:amd64 (1.33.14-8build2, automatic), liblog4cplus:amd64 (1.2.0.1-ubuntu.20.04.200904.1939, automatic), plesk-platform-runtime:amd64 (1.0.2-ubuntu.20.04.200904.1939, automatic), plesk-librdbmspp:amd64 (2.0.2-ubuntu.20.04.200904.1939, automatic) -- Start-Date: 2022-03-16 03:48:18 Commandline: apt-get remove wp-toolkit-cpanel Remove: wp-toolkit-cpanel:amd64 (5.9.3-3400) -- Start-Date: 2022-03-17 02:01:10 Commandline: /usr/bin/apt-get --assume-yes --no-reinstall -o Dpkg::Options::=--force-confnew install wp-toolkit-cpanel Install: plesk-libboost-date-time1.65:amd64 (1.65.1-ubuntu.20.04.200630.1129, automatic), plesk-libboost-1.65:amd64 (1.65.1-ubuntu.20.04.200630.1129, automatic), plesk-libboost-thread1.65:amd64 (1.65.1-ubuntu.20.04.200630.1129, automatic), plesk-libboost-serialization1.65:amd64 (1.65.1-ubuntu.20.04.200630.1129, automatic), libaps:amd64 (1.0.10-ubuntu.20.04.200904.1939, automatic), plesk-libboost-system1.65:amd64 (1.65.1-ubuntu.20.04.200630.1129, automatic), wp-toolkit-cpanel:amd64 (5.9.3-3400), sw-engine:amd64 (2.30.1-ubuntu.20.04.200904.1939, automatic), plesk-libstdc++6.3.0:amd64 (6.3.0-ubuntu.20.04.200630.1040, automatic), plesk-libboost-program-options1.65:amd64 (1.65.1-ubuntu.20.04.200630.1129, automatic), plesk-libboost-filesystem1.65:amd64 (1.65.1-ubuntu.20.04.200630.1129, automatic), plesk-lmlib:amd64 (0.2.4-ubuntu.20.04.200904.1939, automatic), plesk-libpoco-1.9.0:amd64 (1.9.0-ubuntu.20.04.200904.1939, automatic), plesk-libboost-regex1.65:amd64 (1.65.1-ubuntu.20.04.200630.1129, automatic), libxmlrpc-core-c3:amd64 (1.33.14-8build2, automatic), liblog4cplus:amd64 (1.2.0.1-ubuntu.20.04.200904.1939, automatic), plesk-platform-runtime:amd64 (1.0.2-ubuntu.20.04.200904.1939, automatic), plesk-librdbmspp:amd64 (2.0.2-ubuntu.20.04.200904.1939, automatic)
-- As you can see, the "reinstall" commands that are occurring in the above log match the cron jobs. -- This cron job is provided by the wp-toolkit-cpanel package: --[19:04:20 server2 root@94426778 ~]cPs# dpkg -S /etc/cron.d/wp-toolkit-update wp-toolkit-cpanel: /etc/cron.d/wp-toolkit-update
-- This cron job is being left in place on your server due to the "apt-get remove" command being used. Per the Ubuntu documentation here: apt-get purge" is defined as follows: purge purge is identical to remove except that packages are removed and purged (any configuration files are deleted too). Using "purge" will remove the package AND its configuration files. Following this, the cron job was no longer present:[19:14:55 server2 root@94426778 ~]cPs# cat /etc/cron.d/wp-toolkit-update cat: /etc/cron.d/wp-toolkit-update: No such file or directory
This will keep the WordPress Toolkit uninstalled on your server, as this cron job was the reason that the WordPress Toolkit was being reinstalled. Additionally, I have submitted a case to our documentation team with case ID DOC-17759 to update our documentation for WordPress Toolkit here:0
Please sign in to leave a comment.
Comments
95 comments