Kolonel Server - Hosting van infrastructuurservers

Contact informatie

Twist 96072377

[email protected]

Begin

The cPanel WP Toolkit includes a command-line utility called wp-toolkit. This tool allows server administrators to manage WordPress installations directly from the Linux command line, automate routine tasks, and integrate WordPress maintenance into cron jobs.

This guide explains how to use wp-toolkit on Colonelserver infrastructure, including common commands for managing WordPress sites, plug-ins, thema's, updates, and backups.

Important Requirements

  • wp-toolkit is available only on servers with root access
  • You must run all commands as the root user
  • Basic familiarity with the Linux command line is required

About wp-toolkit

wp-toolkit is part of the cPanel WordPress Toolkit ecosystem. It provides fast, scriptable access to WordPress management features that are otherwise handled through the graphical interface.

With wp-toolkit you can:

  • List and inspect WordPress installations
  • Installeren, update, and remove plugins and themes
  • Manage plugin and theme sets
  • Configure Smart Updates
  • Back up and restore WordPress sites
  • Reset administrator passwords
  • Automate tasks using cron

Viewing Available Commands

To display the full list of available commands:

wp-toolkit --help

To view help for a specific command, for example the list command:

wp-toolkit --help -command list

Listing WordPress Installations

To list all WordPress installations detected by WP Toolkit:

wp-toolkit --list

Voorbeelduitvoer:

ID   Installation Path   Owner ID   State          Website URL
1    /public_html/wp     2          OK             https://example.com
2    /public_html/blog   2          Outdated PHP   https://example.com/blog

De ID value is required for most wp-toolkit operations.

Viewing Installation Details

To view detailed information about a specific WordPress installation:

wp-toolkit --info -instance-id X

Replace X with the installation ID.

This command displays:

  • Installation path
  • WordPress version
  • Site URL
  • Admin email address
  • Update and security status
  • SSL configuration
  • Installed plugins and themes

Managing Plugins and Themes with Sets

wp-toolkit supports sets, which are reusable collections of plugins and themes.

Uploading a Plugin to the Cache

wp-toolkit --plugins -operation add \
  -source-url https://downloads.wordpress.org/plugin/hello-dolly.1.7.2.zip

Uploading a Theme to the Cache

wp-toolkit --themes -operation add \
  -source-url https://downloads.wordpress.org/theme/twentytwenty.1.8.zip

Creating a Set

wp-toolkit --sets -operation add -name Basic

After creation, note the returned set ID.

Adding Plugins and Themes to a Set

wp-toolkit --sets -operation add-plugin \
  -set-id 7 -plugin-slug hello-dolly
wp-toolkit --sets -operation add-theme \
  -set-id 7 -theme-slug twentytwenty

Installing a Set on a Site

wp-toolkit --sets -operation install \
  -set-id 7 -instance-id X

Configuring Smart Updates

Smart Updates allow safe testing of WordPress updates on a cloned environment.

Checking Smart Update Status

wp-toolkit --smart-update -operation status -instance-id X

Enabling Smart Updates

wp-toolkit --smart-update -operation enable -instance-id X

Disabling Smart Updates

wp-toolkit --smart-update -operation disable -instance-id X

Backing Up and Restoring WordPress Sites

Backups include all files and the database and are stored as compressed archives.

Creating a Backup

wp-toolkit --backup -operation backup -instance-id X

Backups are stored in:

/home/USERNAME/wordpress-backups/

Listing Available Backups

wp-toolkit --backup -operation list -instance-id X

Restoring a Backup

wp-toolkit --backup -operation restore \
  -instance-id X -filename backup-file.tar.gz

Resetting the WordPress Administrator Password

To reset an administrator password:

wp-toolkit --site-admin-reset-password \
  -admin-login adminusername -instance-id X

If only one administrator exists, de -admin-login option can be omitted.

Automating Tasks with Cron

wp-toolkit can be safely used in cron jobs.

Voorbeeld: Daily backup at 02:15 AM

15 2 * * * /usr/local/bin/wp-toolkit \
  --backup -operation backup -instance-id X >/dev/null 2>&1

Samenvatting

Using wp-toolkit on Colonelserver servers provides full command-line control over WordPress environments. It is ideal for advanced users, systeembeheerders, and automated hosting workflows where speed, consistency, and reliability are required.

For GUI-based management, the standard cPanel WordPress Toolkit interface remains available for supported hosting plans.