Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Commit f7c9570

Browse files
author
Daryl Lozupone
committed
#88 Add instructions for switching PHP versions
1 parent f73979d commit f7c9570

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

FAQ.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,19 @@ If you cannot create a `scripts/` directory in the same directory as your `Vagra
5555
`wplib-scripts/` — and then search for `scripts/` in your `Vagrantfile` and replace it with whatever you named your directory, e.g.
5656
with `wplib-scripts/` as in our example.
5757

58+
## How do I switch PHP versions?
59+
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
60+
you must edit this file manually. This file is located at `/etc/nginx/sites-available/default`.
61+
To change to PHP 7, you must change the line `set $sock php5.6-fpm.sock;` to `set $sock php7.0-fpm.sock;`.
62+
This can be accomplished by connecting to the guest machine via ssh:
63+
64+
cd project-directory
65+
vagrant ssh
66+
sudo nano /etc/nginx/sites-available/default
67+
68+
Change the pertinent line. Press `CTRL-X` to exit the program. When prompted to save the buffer, press `ENTER`. The filename will appear. Press `ENTER` again. Then enter the command `sudo service nginx restart`.
69+
Visit [http://wplib.box/phpinfo.php](http://wplib.box/phpinfo.php) (or whatever domain name you have configured for the box) to verify.
70+
5871
##Glossary: What Do They All These Terms Mean?
5972
The following are terms we have decide to use in our FAQ and in other documents. If any of these terms conflict with broader industry terms please submit a pull request with any suggested corrects.
6073

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ We think that once you try WPLib Box you will agree that we have succeeded. Wan
2020

2121
Service/Software|Version
2222
-------|----------
23-
PHP/PHP5-FPM|5.6.20
23+
PHP-FPM|5.6.20 && 7.0
2424
MySQL|5.5
2525
nginx|1.4
2626
XDEBUG|2.3.3
@@ -92,6 +92,11 @@ To something else that is compatible with your network, i.e. maybe:
9292

9393
We will probably change to a different default IP address in the future.
9494

95+
## Switching PHP Versions
96+
97+
The box has both PHP-FPM 5.6 and 7.0 running concurrently. They are implemented as separate processes with
98+
individual sockets. Instructions on how to select which version to use can be found in the [FAQ](https://github.com/wplib/wplib-box/blob/master/FAQ.md).
99+
95100
## Logging into the WordPress Admin
96101

97102
To login to [wplib.box/wp-admin/](http://wplib.box/wp-admin) use the following credentials:

0 commit comments

Comments
 (0)