Skip to content

Instantly share code, notes, and snippets.

@multidis
Created November 19, 2013 22:29
Show Gist options
  • Save multidis/7553717 to your computer and use it in GitHub Desktop.
Save multidis/7553717 to your computer and use it in GitHub Desktop.
WordPress local development environment on Ubuntu machine (last performed with 12.04). NOTE: overall scheme is local (development) -> testing (e.g. AppFog) -> Production (regular host or Amazon EC2)

Prepare: LAMP setup first

separate gist on LAMP IMPORTANT: pay attention to htaccess-related parts to make sure rewrite-module is working, otherdise WP permalinks will not work.

Install WP

  • Prepare MySQL DB in phpMyAdmin, add user to it
  • Edit config.php accordingly, set debug-mode ON
  • run .../wp-admin/install.php
  • verify WP-part was added to htaccess
  • set post name-permalinks ("pretty" style) and verify

WordPress from testing (AppFog) to local development

The idea here is to have equivalent systems in local development and in testing environment, to easily validate edits before pushing to testing.

This process is streamlined well using Duplicator plugin with a couple of caveats. Follow these steps:

  1. Make image of AppFog installation from WP admin panel, Duplicator plugin area; download installer.php and file archive
  2. In AppFog control panel, find exact name of MySGL bound to the WP installation of interest
  3. Locally, use phpMyAdmin to create DB with the same name as in AppFog (otherwise Duplicator-plugin simplification becomes problematic)
  4. Create some (possibly different from AppFog) DB user and password
  5. Run installer.php from duplicator downloads, proceed as in plugin video (remember to check table drop option in the process and verify new location-path of the local installation; may need to de-select some pluging in advanced-options if their automatic activation causes problems)
  6. Put wp_config.php with proper settings manually, NOT using the one from AppFog.
  7. Save permalinks option to generale local htaccess and verify the cloned setup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment