In Part 2 of our guide to setting up Ubuntu Server for WordPress development, we’ll make some adjustments to the default Apache and PHP settings to prepare for WordPress installation.
Part 2 of 3: Configure Apache and PHP
1. Make sure Apache is working by navigating tohttp://[your-server-name-or-ip-address]
2. Go back to Webmin, navigate to the “Servers | Apache Webserver” screen, and click the “Default Server” link on the “Existing virtual hosts” tab.
Under “Per-Directory Options”, click on “Directory /var/www”.
Click on “Edit Directives”.
Change the 2nd line from “AllowOverride None” to “AllowOverride All” and click the “Save” button.
3. Navigate back to the “Servers | Apache Webserver” page and click the “Configure Apache Modules” link on the “Global Configuration” tab.
Check the box labelled “rewrite” and click the “Enable Selected Modules” button. This will enable mod_rewrite, which lets you use pretty permalinks in WordPress.
4. Navigate to the “Others | PHP Configuration” page and click the “Manage” link next to “Configuration for mod_php”.
On the “Manage PHP Configuration” screen, click on “Resource Limits”.
It’s tempting to set these limits as high as your server will allow, but we recommend setting them to match the limits that will be imposed by your live server. This makes for a more realistic testing environment.
5. Navigate to the “System | Software Packages” page, enter “php5-curl php5-gd php5-mysqlnd” in the box labelled “Packages from APT” and click the “Install” button.
6. Navigate to the “System | Bootup and Shutdown” page and click the “Reboot System” button.
Confirm that you want to reboot.
This concludes Part 2 of our guide to setting up Ubuntu Server for WordPress development. In Part 3 we’ll make some final adjustments, then create a MySQL database and install WordPress.