|
14 | 14 | - [How do I Use WPLib Box on Pre-Existing Projects?](#existing-projects)
|
15 | 15 | - [How do I Configure Composer to Work with WPLib Box?](#composer)
|
16 | 16 | - [How do I Import a MySQL Database?](#import-db)
|
| 17 | +- [What PHP versions are available?](#php) |
17 | 18 | - [How do I Switch PHP Versions?](#php-versions)
|
18 | 19 | - [How do I Install PhpMyAdmin?](#phpmyadmin)
|
19 | 20 | - [How do I Get a URL to Provide Access to My Box's Site From the Internet?](#access)
|
@@ -138,11 +139,30 @@ For this we use the convention that the `default.sql` file is the file used to i
|
138 | 139 |
|
139 | 140 | If you have a live database you may want to dump the database to the `/sql/` directory in your project root `default.sql` and then the above command run within `vagrant ssh` will support importing your default database.
|
140 | 141 |
|
| 142 | +<a href="php"></a> |
| 143 | +### Which PHP Versions are Available? |
| 144 | +Currently, the box has PHP 5.6, PHP 7.0, and HHVM. The PHP is installed from the `ondrej/php` [repository](https://launchpad.net/~ondrej/+archive/ubuntu/php). _(Please note: most answers one might find on the internet regarding `How do I install X module on Ubuntu` are based on previous versions of this repository which only installed one version of PHP on the OS. As such, they will be of no use in this use case.)_ |
| 145 | +This results in both php5.6-fpm and php7.0-fpm services running concurrently, as well as making three versions of each PHP executable available: e.g. `php` (a symlink to `php7.0`), `php7.0`, and `php5.6`. This is true for `phpize` as well. |
| 146 | + |
| 147 | +The configuration directory structure is as follows: |
| 148 | +- /etc |
| 149 | + - /php |
| 150 | + - /5.6 |
| 151 | + - /cli |
| 152 | + - /fpm |
| 153 | + - /mods-available |
| 154 | + - /7.0 |
| 155 | + - /cli |
| 156 | + - /fpm |
| 157 | + - /mods-available |
| 158 | + |
| 159 | + All modules installed are configured for both versions of PHP. |
| 160 | + |
141 | 161 | <a id="php-versions"></a>
|
142 | 162 | ### How do I Switch PHP Versions?
|
143 |
| -The PHP version in use by the site is set in the Nginx vhost configuration. Our intention is to provide a control panel to simplify this process, but currently |
144 |
| -you must edit this file manually. This file is located at `/etc/nginx/sites-available/default`. |
145 |
| -To change to PHP 7, you must change the line `set $sock php5.6-fpm.sock;` to `set $sock php7.0-fpm.sock;`. |
| 163 | +The PHP version in use by the site is set in the Nginx vhost configuration. Our intention is to provide a control panel to simplify this process, but currently you must edit this file manually. This file is located at `/etc/nginx/sites-available/default`. |
| 164 | +To change to PHP 7, you must change the line `set $sock php/php5.6-fpm.sock;` to `set $sock php/php7.0-fpm.sock;`. To use HHVM, change it to `set $sock hhvm/sock`. |
| 165 | + |
146 | 166 | This can be accomplished by connecting to the guest machine via ssh:
|
147 | 167 |
|
148 | 168 | cd project-directory
|
|
0 commit comments