$30 off During Our Annual Pro Sale. View Details »

Developing in a local environment

Developing in a local environment

This is a talk given at the Raleigh WordPress Meetup that goes over the basics of developing in a local environment geared specifically toward WordPress Developers.

Allen Moore

February 18, 2014
Tweet

More Decks by Allen Moore

Other Decks in Programming

Transcript

  1. # Developing in a Local Environment
    !
    Allen Moore
    @creativeallen
    http://www.allenmoore.me

    View Slide

  2. * Building with WordPress since 2005
    * Web Designer at NC State University Department of Electrical and
    Computer Engineering
    * Continuing Education Instructor at Wake Technical Community College
    * 8 years of Contract and Freelance Work prior to NC State
    ## About me

    View Slide

  3. 1. What is local development?
    2. Installing tools for local development
    3. Configuration of tools
    4. Installing WordPress in a local environment
    5. Additional thoughts and tools
    ## Outline

    View Slide

  4. * Mac OSX
    * Text editor
    * Terminal
    ## Assumptions for your environment

    View Slide

  5. * Local environment = your computer
    * Outside of the production environment
    ### What is local development?

    View Slide

  6. ### Advantages of local development?

    View Slide

  7. * Internet connection not required
    ### Advantages of local development?

    View Slide

  8. * Internet connection not required
    * Network failures
    ### Advantages of local development?

    View Slide

  9. * Internet connection not required
    * Network failures
    * Internet outages
    ### Advantages of local development?

    View Slide

  10. * Internet connection not required
    * Network failures
    * Internet outages
    * Other possible headaches
    ### Advantages of local development?

    View Slide

  11. * Internet connection not required
    * Network failures
    * Internet outages
    * Other possible headaches
    * Develop from anywhere
    ### Advantages of local development?

    View Slide

  12. * Internet connection not required
    * Network failures
    * Internet outages
    * Other possible headaches
    * Develop from anywhere
    * Testing, testing, testing
    ### Advantages of local development?

    View Slide

  13. * Internet connection not required
    * Network failures
    * Internet outages
    * Other possible headaches
    * Develop from anywhere
    * Testing, testing, testing
    * Upload, test, fix, REPEAT
    ### Advantages of local development?

    View Slide

  14. * MAMP
    * Windows: WAMP, AMPPS, XAMPP
    * SQL pro
    * Windows: Heidi SQL, PHPMyAdmin
    #### Installing tools for local development

    View Slide

  15. * Mac, Apache, MySQL, PHP
    * http://www.mamp.info
    #### MAMP

    View Slide

  16. * http://www.sequelpro.com/
    #### SQL Pro

    View Slide

  17. * Proper configuration of your development tools will leave you with less
    headaches
    ##### Configuration of tools

    View Slide

  18. * Change server start/stop
    ##### MAMP Configuration

    View Slide

  19. * Apache/MySQl Ports
    ##### MAMP Configuration

    View Slide

  20. * PHP Version
    ##### MAMP Configuration

    View Slide

  21. * Apache
    ##### MAMP Configuration

    View Slide

  22. * Open Terminal and enter the following command
    sudo pico /etc/apache2/httpd.conf
    ##### MAMP Configuration

    View Slide

  23. * Start MAMP
    ##### MAMP Configuration

    View Slide

  24. * MySQL Server
    ##### SQL Pro Configuration

    View Slide

  25. * Local copy of WordPress
    * Database
    ###### Installing WordPress in a local environment

    View Slide

  26. * Download WordPress
    * http://www.wordpress.org
    ###### Installing WordPress in a local environment

    View Slide

  27. * Copy contents of WordPress to your preferred directory
    ###### Installing WordPress in a local environment

    View Slide

  28. * Create a new database in SQL Pro
    ###### Installing WordPress in a local environment

    View Slide

  29. * Edit wp-config-sample.php with database connection info
    ###### Installing WordPress in a local environment

    View Slide

  30. * Edit wp-config-sample.php with WordPress Salt Keys
    * https://api.wordpress.org/secret-key/1.1/salt/
    ###### Installing WordPress in a local environment

    View Slide

  31. * Edit wp-config-sample.php $table_prefix with unique prefix
    ###### Installing WordPress in a local environment

    View Slide

  32. * Save wp-config-sample.php as wp-config.php
    ###### Installing WordPress in a local environment

    View Slide

  33. * Navigate to your local install and complete the WordPress setup
    ###### Installing WordPress in a local environment

    View Slide

  34. * WordPress is installed!
    ###### Installing WordPress in a local environment

    View Slide

  35. * Let’s log in!
    ###### Installing WordPress in a local environment

    View Slide

  36. * Virtual Hosts such as:
    * yourdomain.dev
    * yourdomain.local
    * subdomain.yourdomain.dev
    * WordPress Multisite install
    * Sub-directory
    * Sub-domain
    ####### Additional thoughts and tools

    View Slide

  37. * Git or version control
    * GitHub
    * Bitbucket
    * Gitlab
    * Database Migration
    * WP Migrate DB (Free & Premium)
    * Backup Buddy (Premium)
    * Staging
    * WPStageCoach.com
    * WPEngine (Dev Staging Area)
    * Command Line Tools
    * WP-CLI - wp-cli.org
    * PHP Unit - phpunit.de
    ####### Additional thoughts and tools

    View Slide