How to Set Up Ubuntu Server for WordPress Development: Step by Step Guide – Part 2

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

Apache Default Page

1. Make sure Apache is working by navigating to
http://[your-server-name-or-ip-address]

apache setup - default server

2. Go back to Webmin, navigate to the “Servers | Apache Webserver” screen, and click the “Default Server” link on the “Existing virtual hosts” tab.

Directory /var/www

Under “Per-Directory Options”, click on “Directory /var/www”.

Edit Directives

Click on “Edit Directives”.

AllowOverride All

Change the 2nd line from “AllowOverride None” to “AllowOverride All” and click the “Save” button.

Configure Apache Modules

3. Navigate back to the “Servers | Apache Webserver” page and click the “Configure Apache Modules” link on the “Global Configuration” tab.

enable mod_rewrite

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.

configure mod_php

4. Navigate to the “Others | PHP Configuration” page and click the “Manage” link next to “Configuration for mod_php”.

Manage PHP Configuration

On the “Manage PHP Configuration” screen, click on “Resource Limits”.

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.

install packages for WordPress

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.

Bootup and Shutdown
confirm reboot

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.

Pin It on Pinterest