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

In the last part of our guide to setting up Ubuntu Server for WordPress development, we’ll make some final adjustments, then create a MySQL database and install WordPress.

Part 3 of 3: Adjust User Settings, Create a Database and Install WordPress

We start by enabling login by the www-data user, which is not recommended for production environments, but simplifies SFTP access to our development server.

Users and Groups
no login allowed
normal password

1. In Webmin, navigate to the “System | Users and Groups” page and click on “www-data”.
Notice that the shell is set to “nologin” and “Password” is set to “No login allowed”.
Change the shell to your preferred shell, enter a password in the “Normal password” box, and save your changes.

MySQL root user
Create a new database
Create Database

2. Navigate to the “Servers | MySQL Database Server” page. Enter “root” for the user, put in the password you created for the MySQL root user in Part 1 of this guide, and click the “Save” button.
After the page reloads, click the “Create a new database” link.
Enter a name for the new database and click the “Create” button.

3. Download the latest version of WordPress and unpack the archive to a temporary folder on your computer. Connect to your server using your favorite SFTP client, with “www-data” as the user and the password you set above. Your SFTP client will be looking at the contents of /var/www, which is the home folder for the “www-data” user. Navigate into the html subfolder and delete the default index.html file that Apache put there during LAMP installation. Upload the contents of the WordPress installation archive to the /var/www/html folder.

If you’re using virtualization, now is the ideal time to make a snapshot of your server’s state. Doing this will make it easy to clone additional WordPress development servers at will. Taking a snapshot after you install WordPress works too, but you’ll end up with the same admin user name and password in each clone. You’ll also have identical authentication keys and salts in each clone. You might forget to change these values before migrating WordPress to a production server.

choose a language

4. In your browser navigate to
http://[your-server-name-or-ip-address]
If you don’t see the WordPress installer’s language selection screen, double-check to make sure you uploaded the WordPress files to the right place.

WordPress database details
database OK

5. On the next screen, enter the name of the database you created above and the MySQL root user’s credentials. Don’t use the MySQL root user in a production environment. Use the default localhost for the Database Host and whatever makes sense to you for the Table Prefix.
If all is well, the next screen will confirm that WordPress can talk to the database.

WordPress final screen

6. On the next WordPress install screen, enter the name of your site, an admin user name (don’t use “admin”, even on a development server!) and your email address. You can choose a password or let WordPress generate one for you.

39-wordpress-setup

7. The final WordPress install screen will confirm that everything is complete, and will display the password WordPress generated for you if you didn’t enter one.

You can now log into WordPress by navigating to
http://[your-server-name-or-ip-address]/wp-admin

This concludes our guide to setting up Ubuntu Server for WordPress development. Let us know in the comments if you have any questions or suggestions, and thanks for reading.

3 thoughts on “How to Set Up Ubuntu Server for WordPress Development: Step by Step Guide – Part 3”

Comments are closed.

Pin It on Pinterest