Installing WP-CLI on CentOS, Fedora, or Red Hat provides a reliable command-line path for routine WordPress administration. The wp command is useful for site URL updates, content maintenance, plugin changes, cache flushes, and scripted operational tasks that are awkward to repeat through the browser.
The verified install path uses the official WP-CLI Phar build instead of relying on distro package availability. That keeps the installation method consistent across Fedora and RHEL-family systems, where package names and repositories can differ more than the PHP CLI runtime requirements.
The command itself does not require a web server restart, but it should be executed from the correct WordPress directory and under an account that can read the site files. A successful wp --info check confirms that WP-CLI is installed; some subcommands still depend on extra tools such as mysqldump or on valid database credentials in /wp-config.php/.
$ sudo dnf install --assumeyes ca-certificates curl php-cli less Updating and loading repositories: ##### snipped ##### Complete!
The verified Fedora 42 test environment installed php-cli 8.4.19.
$ curl -sSLO https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
$ chmod +x wp-cli.phar
$ sudo mv wp-cli.phar /usr/local/bin/wp
$ wp --info OS: Linux 6.12.72-linuxkit #1 SMP Wed Feb 25 13:21:17 UTC 2026 aarch64 Shell: PHP binary: /usr/bin/php PHP version: 8.4.19 php.ini used: /etc/php.ini WP_CLI phar path: phar:///usr/local/bin/wp WP-CLI version: 2.12.0
If the shell still reports wp: command not found, confirm that /usr/local/bin is in the active PATH and that the file was moved as wp.
$ cd /var/www/html
Use the directory that contains /wp-config.php/ for the site that the wp command should manage.