WordPress/wordpress-develop là dự án mã nguồn mở trên GitHub, viết chủ yếu bằng PHP, với 3.5k sao. WordPress Develop, Git-ified. Synced from git://develop.git.wordpress.org/, including branches and tags! This repository is just a mirror of the WordPress subversion repository. Please include a link to a pre-existing ticket on https://core.trac.wordpress.org/ with every pull request.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Welcome to the WordPress development repository! Please check out the contributor handbook for information about how to open bug reports, contribute patches, test changes, write documentation, or get involved in any way you can.
Getting Started
Credentials
Getting Started
Local development
WordPress is a PHP, MySQL, and JavaScript-based project, and uses Node for its JavaScript dependencies. A local development environment is available to quickly get up and running.
You will need a basic understanding of how to use the command line on your computer. This will allow you to set up the local development environment, to start it and stop it when necessary, and to run the tests.
You will need Node and npm installed on your computer. Node is a JavaScript runtime used for developer tooling, and npm is the package manager included with Node. If you have a package manager installed for your operating system, setup can be as straightforward as:
macOS: brew install node
Windows: choco install nodejs
Ubuntu: apt install nodejs npm
If you are not using a package manager, see the Node.js download page for installers and binaries.
Note: WordPress currently only officially supports Node.js 24.x and npm 11.x.
You will also need a container environment such as Docker Desktop installed and running on your computer. The container environment is the virtualization software that powers the local development environment and can be installed just like any other regular application.
Note: WordPress currently only officially supports Docker but several container environments are available and should generally be compatible, such as Colima, OrbStack, Podman Desktop, and Rancher Desktop.
Windows-specific instructions
For development on Windows, Windows Subsystem for Linux (WSL) is recommended. This provides a Linux environment where the general development instructions can be used without modification.
After installing Docker Desktop, enable Docker's WSL integration under Settings > Resources > WSL integration. This only needs to be configured once.
If you use Docker Desktop directly from Windows without WSL, make sure it is using Linux containers. Right-click the Docker icon in the system tray and select Switch to Linux containers.... If that option is not available, or the menu shows Switch to Windows containers..., Docker is already using Linux containers. You can switch between container types later if another project requires Windows containers.
Development Environment Commands
Ensure your container environment is running before using these commands.
To start the development environment for the first time
You can get started using the local development environment with these steps:
Go to https://github.com/WordPress/wordpress-develop and fork the repository to your own GitHub account.
Then clone the forked repository to your computer using git clone https://github.com/<your-username>/wordpress-develop.git.
Navigate into the directory for the cloned repository using cd wordpress-develop.
Add the origin repo as an upstream remote via git remote add upstream https://github.com/WordPress/wordpress-develop.git.
Then you can keep your branches up to date via git pull --ff upstream trunk, for example.
Alternatively, if you have the GitHub CLI installed, you can simply run gh repo fork WordPress/wordpress-develop --clone (docs). This command will:
Fork the repository to your account (use the --org flag to clone into an organization).
Clone the repository to your machine.
Add WordPress/wordpress-develop as upstream and set it to the default remote repository
After this, remember to run cd wordpress-develop.
Once you have forked and cloned the repository to your computer, run the following commands in a terminal:
npm install
npm run build:dev
npm run env:start
npm run env:install
Your WordPress site will be accessible at http://localhost:8889. You can view or change the configuration settings in the .env file located in the root directory of the project.
To watch for changes
If you're making changes to WordPress core files, you should start the file watcher in order to build or copy the files as necessary:
npm run dev
To stop the watcher, press ctrl+c.
To run a WP-CLI command
npm run env:cli -- <command>
WP-CLI has many useful commands you can use to work on your WordPress site. Where the documentation mentions running wp, run npm run env:cli -- instead. For example:
npm run env:cli -- help
To run the tests
These commands run the PHP and end-to-end test suites, respectively:
npm run test:php
npm run test:e2e
You can pass extra parameters into the PHP tests by adding -- and then the command-line options:
npm run test:php -- --filter <test name>
npm run test:php -- --group <group name or ticket number>
To run the JavaScript (QUnit) tests:
npm run grunt qunit:compiled
qunit:compiled builds first, then runs the suite. The QUnit runner loads scripts from the built build/ directory, so a plain npm run grunt qunit requires a completed npm run build first; without a build, every test fails with a jQuery is not defined error.
To lint the workflow files
GitHub Actions workflows operate in a privileged software supply chain environment, therefore all workflow files must adhere to a high degree of quality and security standards.
All YAML workflow files within the .github/workflows directory are statically scanned when modified using Actionlint and Zizmor. It's recommended that you install both of these tools locally using a package manager to run prior to submitting changes to workflow files.
Actionlint installations instructions
Zizmor installation instructions
To run Actionlint:
actionlint
To run Zizmor for all workflow files (note the trailing period):
zizmor .
Note: A workflow run failure will not occur when issues are detected by Zizmor. Instead, the generated report is submitted to GitHub Code Scanning and surfaced through a status check. Some locally reported issues may be ignored based on the repository's configured Code Scanning settings.
Generating a code coverage report
PHP code coverage reports are generated daily and submitted to Codecov.io.
After the local container environment has been installed and started, the following command can be used to generate a code coverage report.
npm run test:coverage
The command will generate three coverage reports in HTML, PHP, and text formats, saving them in the coverage folder.
Note: xDebug is required to generate a code coverage report, which can slow down PHPUnit significantly. Passing selection-based options such as --group or --filter can decrease the overall time required but will result in an incomplete report.
To restart the development environment
You may want to restart the environment if you've made changes to the configuration in the docker-compose.yml or .env files. Restart the environment with:
npm run env:restart
To stop the development environment
You can stop the environment when you're not using it to preserve your computer's power and resources:
npm run env:stop
To start the development environment again
Starting the environment again is a single command:
npm run env:start
Resetting the development environment
The development environment can be reset. This will destroy the database and attempt to remove the pulled container images.
npm run env:reset
Apple Silicon machines and old MySQL/MariaDB versions
Older MySQL and MariaDB container images do not support Apple Silicon processors (M1, M2, etc.). This is true for:
MySQL versions 5.7 and earlier
MariaDB 5.5
When using these versions on an Apple Silicon machine, you must create a docker-compose.override.yml file with the following contents:
services:
mysql:
platform: linux/amd64
Additionally, the "Use Rosetta for x86/AMD64 emulation on Apple Silicon" setting in your container environment (if applicable) needs to be disabled for this workaround.
Credentials
These are the default environment credentials:
Database Name: wordpress_develop
Username: root
Password: password
To login to the site, navigate to http://localhost:8889/wp-admin.
Username: admin
Password: password
Note: With Codespaces, open the portforwarded URL from the ports tab in the terminal, and append /wp-admin to login to the site.
To generate a new password (recommended):
Go to the Dashboard
Click the Users menu on the left
Click the Edit link below the admin user
Scroll down and click 'Generate password'. Either use this password (recommended) or change it, then click 'Update User'. If you use the generated password be sure to save it somewhere (password manager, etc).
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/WordPress/wordpress-develop là nguồn chính thức.
WordPress/wordpress-develop có bao nhiêu sao?
WordPress/wordpress-develop có 3.5k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/WordPress/wordpress-develop. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
WordPress/wordpress-develop có phải mã nguồn mở không?
Có — WordPress/wordpress-develop phát hành theo license GPL-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/WordPress/wordpress-develop.
WordPress/wordpress-develop có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho WordPress/wordpress-develop. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
WordPress/wordpress-develop có trang demo không?
Dự án có trang chủ ở https://make.wordpress.org/core/handbook/contribute/git/github-pull-requests-for-code-review/. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
WordPress/wordpress-develop còn đang phát triển không?
Commit gần nhất trên WordPress/wordpress-develop là 2 ngày trước (theo timestamp GitHub). Repo có 3.8k fork — một chỉ báo về mức độ quan tâm của cộng đồng.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về wordpress-develop?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về wordpress-develop.