Code Monkey home page Code Monkey logo

wp-foundation-six's Introduction

WP Foundation Six Developer Framework

The WordPress Foundation 6 Developer Framework is meant to be a starting point for developers to create projects without having third party code/modules within their git repo. This project uses Composer to install WordPress and default plugins as project dependencies. The base theme uses NPM to install script dependencies, and Gulp as the build system. Gulp also uses Babel and Webpack to transpile ES6/ES2015 to ES5 so that you can use the latest ECMAScript syntax.

TL;DR

Setup

  • git clone https://github.com/Blake-C/wp-foundation-six.git your-project-name
  • cd your-project-name
  • rm -rf .git
  • git init && git add -A
  • git commit -m "Initial Commit"
  • docker-compose up -d
  • docker container list -a - get the id (############) of the general-cli container
  • docker exec -it ############ zsh

From here you have two options, auto or manual.

Auto

Manual Steps

  • composer install
  • composer update
  • cd wp-content/themes/wp-foundation-six/
  • npm install
  • gulp

Access the database

Importing

This process assume you've setup a site using wp-foundation-six and now need to move a production site into your local install fresh.

  • git clone your-project-name.git
  • cd your-project-name
  • docker-compose up -d
  • docker container list -a - get the id (############) of the general-cli container
  • docker exec -it ############ zsh
  • Move your plugins and uploads directories into /wp_content
    • Replace the theme directory as well if not using wp-foundation-six
  • Upload database into the wp_foundation_six database
    • Database under http://localhost:8000
    • Make sure you have docker exec'd into the general-cli container
      • wp search-replace https://production.com http://localhost --precise --all-tables
        • Use the same URL in the wp_options table under siteurl
      • wp option update siteurl 'http://localhost/wp'
        • Core WordPress is installed under the wp directory by composer so we need to point the site root to this location
      • Site will load under http://localhost
  • In the terminal change directories into the wp-foundation-six theme
    • npm install
    • gulp

Import Troubleshooting

  • If wp search-replace fails try temporarily renaming your plugins directory and try again.
  • If you receive php warnings try disabling plugins you don't need while working locally.
    • wp-rocket
    • wordfence
    • any caching plugins
    • any security plugins
    • mailing plugins
  • If the install WordPress interface appears, make sure the siteurl was updated in the wp_options table.
    • siteurl should be http://localhost/wp
  • If your database is not found or your site does not load make sure the wp-config.php file has the default values for the project.
    • define( 'DB_NAME', 'wp_foundation_six' );
    • define( 'DB_USER', 'root' );
    • define( 'DB_PASSWORD', 'root' );
    • define( 'DB_HOST', 'mysql' );
    • The $table_prefix will be unique for each site, use what is on your database tables. For instance the wp_options table might be ahja_options. ahja_ would be your $table_prefix.
  • If your database does not import check the size of you database and make sure the phpmyadmin environment variable UPLOAD_LIMIT is high enough in the docker-compose.yml file.
    • By default it's 300M.

When done

  • exit
  • docker-compose down

Project Documentation

https://blake-c.github.io/wp-foundation-six/

Checkout the changelog for details on recent updates.

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.