Startseite » Scripting » Install WordPress CLI on your server without admin privileges.

Install WordPress CLI on your server without admin privileges.

Introduction:

In this tutorial, we’ll walk you through the steps to install the WordPress CLI (Command Line Interface) on your server without requiring admin rights. The WordPress CLI allows you to manage your WordPress site directly from the command line, making tasks like plugin management, site configuration, and content creation much more efficient.

Step 1: Access Your Server:

Begin by accessing your server via SSH (Secure Shell) or any other method provided by your hosting provider.

Step 2: Download WordPress CLI:

Once logged in to your server, navigate to your wordpress folder. You can use the following command to download the WordPress CLI Phar (PHP Archive) file:

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

Step 3: Make the Phar File Executable:

After downloading the WordPress CLI Phar file, you need to make it executable using the following command:

chmod +x wp-cli.phar

Step 4: Rename the Phar File:

Next, you can rename the WordPress CLI Phar file in your WordPress directory. Use the following command:

mv ./wp-cli.phar ./wp

Step 5: Update the path variable:

To call the CLI-Tool from everywhere we need to add it to the $PATH variable. As most servers are based on Linux, the corresponding command could look like this:

export PATH=$PATH:/wordpress/wp

Step 6: Verify Installation:

To verify that the WordPress CLI has been installed successfully, you can run the following command:

wp --info

This command will display information about the installed WordPress CLI version and configuration.

Step 7: Start Using WordPress CLI:

You’re now ready to start using the WordPress CLI to manage your WordPress site directly from the command line! You can use commands like wp plugin list, wp theme install, wp post create, and many more to perform various tasks.

Conclusion:

By following the steps outlined in this tutorial, you’ve successfully installed the WordPress CLI on your server without admin rights. You can now enjoy the convenience of managing your WordPress site via the command line interface.


Schreiben Sie einen Kommentar

Ihre E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Avatar von sonaht@googlemail.de
Christian Thanos
S/4 Full Stack Expert