🥹Installing WP-CLI in Windows (ok)
https://make.wordpress.org/cli/handbook/guides/installing/
Last updated
Was this helpful?
https://make.wordpress.org/cli/handbook/guides/installing/
Last updated
Was this helpful?
Sử dụng: https://wp-cli.org/
Ta thấy nó tạo duy nhất 1 link
Kể cả shop cũng vậy
Trong back-end cũng hiển thị 1 ảnh chỗ thumbnail
Rồi ta tắt đi và thực hiện lại nó lại hoạt động
Đôi khi nó hoạt động như điên ta chỉ cần tắt trong functions.php nó hoạt động không như lúc trước ta cần phải vào media.php cần chú ý
Ta thử up 1 ảnh xem sao nó đúng là chỉ tạo 1 ảnh
Hiện tại không hiểu sao nó chỉ chạy cách 2
composer global require wp-cli/wp-cli
If you're seeing "zsh: command not found: wp" when trying to use WP-CLI in your site shell, it means that the WP-CLI tool isn't installed or properly configured on your system, and you need to install it before you can use its commands within your site shell. How to Fix:
Install WP-CLI:
Using Composer:
Open your terminal and navigate to your WordPress root directory.
Run the command: composer global require wp-cli/wp-cli
Manually (on Linux/macOS):
Download the latest WP-CLI package from the official website.
Extract the archive and place the wp
executable file in a directory within your system path (e.g., /usr/local/bin
).
Things to Check:
Path Variable:
Ensure that the directory containing the wp
executable is added to your system's PATH
environment variable.
You can check this by running echo $PATH
in your terminal.
Site Shell Access:
Verify that your site shell is properly configured to access the correct WordPress directory on your server where WP-CLI should be available.
Permissions:
Make sure you have the necessary permissions to execute the wp
command.
Troubleshooting Steps:
Check Installation:
Try running wp --version
in your terminal. If it returns information about the WP-CLI version, it's installed correctly.
Re-source Environment:
If you recently installed WP-CLI, try re-sourcing your shell configuration file (e.g., .bash_profile
or .zshrc
) to update your environment variables.
Specific Environment Issues:
Local Development: If you're using a local development environment like Local by Flywheel, check their documentation for specific instructions on installing and using WP-CLI.
C:\wp-cli\wp.bat
Ví dụ:
https://developer.wordpress.org/cli/commands/plugin/install/
Cài đặt trên git
https://developer.wordpress.org/cli/commands/post/create/
C:\xampp\htdocs\example\wp-cli.yml
https://make.wordpress.org/cli/handbook/guides/quick-start/