Skip to main content

How to install WP-CLI on Directadmin Centos 8

Install 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

Geef een reactie

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *