Skip to main content

How to install WP-CLI on Directadmin Centos 8

Install WP-CLI,WP-CLI is not pre-installed on your hosting package. There are actually two simple reasons for this. Not everyone with a hosting package necessarily wants to use WordPress. In addition, installing WordPress does not mean that someone wants WP-CLI right away. Fortunately, installing WP-CLI yourself is easy and can be easily updated when needed.,WP-CLI is available as a PHP Archive file (,.phar,). You can download it using either,wget,curl,commands:,curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar,Or,wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar,You need to make this,file executable and move it to,/usr/local/bin,so that it can be run directly:,chmod +x wp-cli.phar sudo mv wp-cli.phar /usr/local/bin/wp,Install the JSON extension for PHP 7. You will need this extension in order to use the WP-CLI.,sudo dnf install php-json,Check if it is installed properly:,wp -info,Install WP-CLI WP-CLI is not pre-installed on your hosting package. There are actually two simple reasons for this. Not everyone with a hosting package necessarily wants to use WordPress. Additionally, installing WordPress does not mean that someone wants WP-CLI right away. Fortunately, installing WP-CLI yourself is easy to do and then also easy to update when needed. WP-CLI [...]

WP-CLI wordt niet voorgeïnstalleerd op je hostingpakket. Daar zijn eigenlijk twee simpele redenen voor. Niet iedereen met een hostingpakket wil per se WordPress gebruiken. Wel WordPress installeren betekent daarnaast niet dat iemand ook meteen WP-CLI wil. Gelukkig is zelf WP-CLI installeren zo gebeurd en daarna ook makkelijk bij te werken wanneer nodig.

  1. WP-CLI is available as a PHP Archive file (.phar). You can download it using either wget or curl commands:
    curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
    Or
    wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
  2. You need to make this .phar file executable and move it to /usr/local/bin so that it can be run directly:
    chmod +x wp-cli.phar sudo mv wp-cli.phar /usr/local/bin/wp
  3. Install the JSON extension for PHP 7. You will need this extension in order to use the WP-CLI.
    sudo dnf install php-json
  4. Check if it is installed properly:
    wp –info

Leave a Reply

Your email address will not be published. Required fields are marked *