GithubHelp home page GithubHelp logo

isabella232 / umbrella-workdayminn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from inn/umbrella-workdayminn

0.0 0.0 0.0 334 KB

Umbrella repository for Workday Minnesota.

License: GNU General Public License v2.0

PHP 28.25% CSS 67.69% JavaScript 2.18% Hack 1.89%

umbrella-workdayminn's Introduction

Cloning a wordpress site via valet

Prerequisites: Having a running install of Laravel Valet and the WordPress command-line interface wp.

  1. cd to the directory where you have chosen to keep your valet sites.
    • You can find this directory by running valet paths; the appropriate directory will not be the one with /.valet/ in its path.
    • If that command returns no appropriate directory, or no paths at all, you should create a directory on your computer to hold Valet site install directories. mkdir ~/sites/ will create a folder named sites in your user's home directory. Then, run cd ~/sites/ to go there, and valet park to register this directory with Valet so that all subdirectories will be served as .test domains.
  2. Create the install's directory:
    • If an umbrella repo exists:
      1. git clone [email protected]:INN/umbrella-workdayminn
      2. git submodule update --init --recursive
  3. cd umbrella-workdayminn
  4. wp core download
  5. wp config create --dbname=example --dbuser=<user> --dbpass=<pass>, where <user> and <pass> are the database username and password for your computer.
  6. wp db create
    • if you're working on a multisite, you'll need to add some things to wp-config.php. The best way to do that is
      1. wp core install
      2. wp core multisite-convert --subdomains --base=workdayminnesota.test --title=foo
        • where workdayminnesota.test is the domain created by Valet for this directory
        • --title=foo must be passed but is unimportant and will be reset when you load the database.
  7. wp db reset
  8. download the sql file, through phpmyadmin/flywheel's interface
  9. wp db import database.sql, replacing database.sql with the path to the database you downloaded
    • If the output of that command contains ERROR 2006 (HY000) at line 488: MySQL server has gone away or your mysql error log contains [Note] Aborted connection 10 to db: 'example' user: 'user' host: 'localhost' (Got a packet bigger than 'max_allowed_packet' bytes), this StackOverflow solution worked for Ben on 2018-08-22.
      • Find your mysql error log on OSX by running ps auxww | grep mysqld and looking for a string like --log-error=/usr/local/var/mysql/example.local.err
  10. wp search-replace workdayminnesota.org workdayminnesota.test --url=workdayminnesota.org --all-tables-with-prefix
    • if you're doing a multisite, make sure to rerun that command, replacing workdayminnesota.org with subdomain.org and workdayminnesota.test with subdomain.workdayminnesota.test, and changing the --url= parameter to match the valet domain that you just set everything to in the preceding search-replace:
      • wp search-replace subdomain.org subdomain.workdayminnesota.org --url=workdayminnesota.test --all-tables-with-prefix
      • wp search-replace subdomain.workdayminnesota.org subdomain.workdayminnesota.org --url=workdayminnesota.test --all-tables-with-prefix
      • if you're not sure what the URLs for the sites in the multisite are, check the wp_blogs table.
  11. Optionally, run valet secure to serve this site locally over HTTPS using a self-signed certificate. For more about this command, see the Laravel Valet docs.
  12. Optionally, download images and uploads via SFTP. You'll probably only need the newest month's images and the images referenced in the theme settings. Feel free to upload replacement images to the new development site via the normal browser interface.
  13. In the repo's child theme, if there's a package.json, run npm install

umbrella-workdayminn's People

Contributors

benlk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.