Add troubleshooting for PHP install (#38239)

* Add troubleshooting for PHP install.

Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>

---------

Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>
This commit is contained in:
Sam Seay 2023-05-19 12:03:43 +12:00 committed by GitHub
parent e8afe4649a
commit aecd786907
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 8 deletions

View File

@ -90,3 +90,25 @@ pnpm -- wp-env destroy
Each of the [plugins in our repository](plugins) support using this tool to spin up a development environment. Note that rather than having a single top-level environment, each plugin has its own. This is done in order to prevent conflicts between them.
Please check out [the official documentation](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/) if you would like to learn more about this tool.
## Troubleshooting
### Installing PHP in Unix (e.g. Ubuntu)
Many unix systems such as Ubuntu will have PHP already installed. Sometimes without the extra packages you need to run WordPress and this will cause you to run into troubles.
Use your package manager to add the extra PHP packages you'll need.
e.g. in Ubuntu you can run:
```
sudo apt update
sudo apt install php-bcmath \
php-curl \
php-imagick \
php-intl \
php-json \
php-mbstring \
php-mysql \
php-xml \
php-zip
```

View File

@ -12,7 +12,7 @@ To get up and running within the WooCommerce Monorepo, you will need to make sur
- [NVM](https://github.com/nvm-sh/nvm#installing-and-updating): While you can always install Node through other means, we recommend using NVM to ensure you're aligned with the version used by our development teams. Our repository contains [an `.nvmrc` file](.nvmrc) which helps ensure you are using the correct version of Node.
- [PNPM](https://pnpm.io/installation): Our repository utilizes PNPM to manage project dependencies and run various scripts involved in building and testing projects.
- [PHP 7.2+](https://www.php.net/manual/en/install.php): WooCommerce Core currently features a minimum PHP version of 7.2. It is also needed to run Composer and various project build scripts.
- [PHP 7.2+](https://www.php.net/manual/en/install.php): WooCommerce Core currently features a minimum PHP version of 7.2. It is also needed to run Composer and various project build scripts. See [troubleshooting](DEVELOPMENT.md#troubleshooting) for troubleshooting problems installing PHP.
- [Composer](https://getcomposer.org/doc/00-intro.md): We use Composer to manage all of the dependencies for PHP packages and plugins.
Once you've installed all of the prerequisites, you can run the following commands to get everything working.