RepositoryPHP
wp-cli

wp-cli/server-command

Launches PHP's built-in web server for a specific WordPress installation.

68sao
19fork
0issue
3lượt xem

🚀 Chạy WordPress ngay trên máy tính với một lệnh duy nhất

Khởi chạy PHP built-in web server cho WordPress chỉ bằng wp server, không cần cài đặt môi trường phứ tạp.

wp-cli/server-command là một gói lệnh cho WP-CLI, giúp bạn nhanh chóng khởi động máy chủ phát triển cục bộ (localhost) cho bất kỳ cài đặt WordPress nào. Thay vì phải cấu hình Apache, Nginx hay XAMPP thủ công, bạn chỉ cần một lệnh và mọi thứ đã sẵn sàng.

✨ Điểm nổi bật

  • Khởi chạy nhanh: Dùng php -S để chạy web server trực tiếp trên thư mục WordPress.
  • Tùy chỉnh host và port: Mặc định là localhost:8080, nhưng có thể thay đổi linh hoạt.
  • Hỗ trợ docroot tùy chỉnh: Chỉ định thư mục gốc cho trang web.
  • Cấu hình .ini riêng: Dùng --config để tải file cấu hình PHP tùy chỉnh.
  • Chuyển đổi HTTPS → HTTP: Tùy chọn --adapt-scheme giúp sửa lại URL HTTPS khi chạy trên HTTP.
  • Truyền tham số PHP: Gửy thêm tham số như -dzend_extension=xdebug.so vào PHP binary.
  • Đã tích hợp sẵn trong WP-CLI: Không cần cài đặt thêm bất kỳ gói nào.

💡 Vì sao đáng chú ý

Đây là công cụ rất tiện lợi cho các nhà phát triển WordPress muốn nhanh chóng test trang web mà không cần thiết lập môi trường máy chủ phứ tạp. Tuy nhiên, do PHP built-in web server không hỗ trợ .htaccess, nên dự án này phù hợp cho môi trường phát triển và kiểm thử nhẹ, không dùng cho môi trường sản phẩm.


#WPCLI #WordPress #PHP #Server #LocalDevelopment #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryPython
sherlock-project/sherlock

Hunt down social media accounts by username across social networks

120.3k
Dec 2, 2026
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

487.0k
Dec 2, 2026
RepositoryPython
yt-dlp/yt-dlp

A feature-rich command-line audio/video downloader

212.4k
Dec 2, 2026
RepositoryPHP
wp-cli/wp-cli

⚙️ WP-CLI framework

5.2k
Nov 25, 2026
RepositoryPHP
wp-cli/profile-command

Quickly identify what's slow with WordPress

295
Nov 23, 2026
RepositoryPHP
typisttech/image-optimize-command

Easily optimize images using WP CLI

173
Nov 3, 2026
RepositoryPHP
wp-cli/restful

Unlocking the potential of the WP REST API at the command line

155
Nov 24, 2026
RepositoryPHP
wp-cli/entity-command

Manage WordPress comments, menus, options, posts, sites, terms, and users.

105
Nov 26, 2026
RepositoryPHP
nlemoine/wp-cli-fixtures

Easily generate custom fake data for WordPress using YAML and WP-CLI

102
Aug 29, 2025