How to Install WordPress Using the WP Toolkit Through CLI

WordPress is one of the most popular content management systems (CMS) used for building websites, blogs, and online stores. To make WordPress management easier, WP Toolkit is a tool provided by many hosting platforms (like cPanel and Plesk) that allows users to install, manage, and configure WordPress instances with ease.

While WP Toolkit typically comes with a graphical user interface (GUI), it can also be accessed and used via the Command Line Interface (CLI), which is helpful for developers, administrators, or anyone managing multiple WordPress installations. This guide will walk you through how to install WordPress using the WP Toolkit through CLI.

Prerequisites

1. Server Access: You need SSH access to the server where you want to install WordPress.

2. WP Toolkit Installed: WP Toolkit should be installed and activated on your hosting platform. It is usually included in hosting platforms such as cPanel, Plesk, or custom server setups.

3. Database and FTP Credentials: Ensure you have the necessary credentials for creating or connecting to a database.

4. Basic Command-Line Knowledge: You should be comfortable using a terminal/command prompt.

Step-by-Step Guide

Step 1: Access Your Server via SSH

To begin, connect to your server through SSH. This can be done using a terminal (Linux/macOS) or an SSH client like PuTTY (Windows).

Once connected, ensure you have root or sufficient privileges to run commands and access the WP Toolkit.

Step 2: Verify WP Toolkit Installation

Check if WP Toolkit is installed and functioning on your server by running the following command:

You should see wp-toolkit listed among the installed extensions. If it is not installed, you’ll need to install it through your server’s control panel or package manager.

Step 3: Identify Available Domains

Before installing WordPress, you need to determine which domains or subdomains are available for the installation. Use the following command to list the domains:

This command will display a list of domains or subscriptions available under your account. Choose the domain where you want to install WordPress.

Step 4: Create a New WordPress Installation

To install WordPress on a specific domain using the WP Toolkit, run the following command:

Replace `yourdomain.com` with the actual domain or subdomain where you want WordPress installed.

Example: If you want to install WordPress on `example.com`, the command will look like this:

This command automatically:

– Downloads the latest version of WordPress.

– Sets up the database.

– Installs WordPress on the specified domain.

Step 5: Customize Installation (Optional)

If you want to customize the installation (e.g., use a specific WordPress version, database details, etc.), you can add options to the command. Here’s a command with additional parameters:

– version: Specifies the WordPress version to install.

– admin-email: Specifies the admin email for the WordPress instance.

– admin-user: Defines the admin username.

– admin-password: Sets a strong admin password.

You can customize the installation further based on your specific requirements.

Step 6: Verify the Installation

Once the installation is complete, you should verify the new WordPress site. You can check the status by running:

This will list all WordPress installations on the server, allowing you to confirm that the installation was successful.

Step 7: Secure Your WordPress Installation (Optional)

WP Toolkit offers several security measures you can apply to your WordPress installation through CLI. To secure your new installation, run:

Replace `<ID>` with the installation ID obtained from the previous `list` command.

This will apply various security settings, such as:

– Disabling file editing in the WordPress dashboard.

– Enforcing strong password policies.

– Restricting access to sensitive WordPress files.

Step 8: Manage Plugins and Themes (Optional)

You can also manage WordPress plugins and themes using the WP Toolkit CLI. For example, to install a plugin, run:

This command installs the WooCommerce plugin on the specified WordPress installation.

To install a theme:

This installs the Twenty Twenty-One theme on the selected WordPress installation.

Additional WP Toolkit CLI Commands

Here are a few more useful commands for managing your WordPress installation via WP Toolkit CLI:

  • Update WordPress Core:

  • Enable Debug Mode:

  • Backup WordPress Installation:

  • Clone WordPress Installation:

Installing WordPress using the WP Toolkit CLI is a fast and efficient method, especially for users managing multiple installations or those who prefer a command-line environment. This approach ensures flexibility, security, and control over the installation process. By following the steps above, you can quickly set up WordPress, customize the installation, secure it, and manage themes and plugins without needing to rely on a graphical interface.