Skip to content

Instantly share code, notes, and snippets.

@joshuarrrr
Last active February 6, 2017 21:16
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshuarrrr/b08e1ad8f1e12448ea3b122755cdce9d to your computer and use it in GitHub Desktop.
Save joshuarrrr/b08e1ad8f1e12448ea3b122755cdce9d to your computer and use it in GitHub Desktop.
Clone a local version of a Wordpress site
  1. Install Duplicator plugin

  2. Build package (optionally filter out large image files)

  3. Download archive and installer to an empty directory

  4. Create a softlink to the directory ({name}) in the webserver folder

    $ sudo ln -s /{name} /var/www/html/{name}
    
  5. Change ownership of the directory to make it writable

    $ sudo chown -R www-data /{name}/
    
  6. Start web server and database

    $ sudo service apache2 restart
    $ sudo /etc/init.d/mysql start
    
  7. Create new database

    $ mysql -u root -p
    mysql> CREATE DATABASE {wp_name};
    mysql> FLUSH PRIVILEDGES;
    mysql> exit
    
  8. Go to http://localhost/{name}/installer.php in browser and run installation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment