Giter Site home page Giter Site logo

platform.sh-wordpress-starter's Introduction

Platform sh Wordpress Project Starter

Platform.sh is a second generation Platform-as-a-Service (PAAS) offering a continuous deployment cloud hosting solution.

Local Development Environment

Local development environment is handled via Lando. Lando documentation can be viewed here

Run Composer

Before settings up Lando install composer, open a terminal window in the project root and run composer install. This will install the necessary components in order to continue.

Setup, install and run Lando

Create .env file

  1. Save dorenv-example as .env in the same root folder.
  2. Open .env file and amend vales. For database credentials please refer to the lando LEMP documentation or use the below:
DB_HOST=database
DB_NAME=lemp
DB_PASSWORD=lemp
DB_USER=lemp

Configure Lando

Lando configuration can be amended via the .lando.yml file. For more information on configureing the Lando development environment please refer to the Lando documentation.

If Lando is not installed, head over to Lando documentation for system requirements and installation instructions

Run Lando

Once configured cd into the project directory. Lando can be ran via the below CLI command:

lando start

After a successful start up you should see something similar to the below:

 NAME                  website-local                                     
 LOCATION              /Users/alex.oliver/Desktop/platform.sh-wp-starter 
 SERVICES              appserver_nginx, appserver, database, mailhog     
 APPSERVER_NGINX URLS  https://localhost:32795                           
                       http://localhost:32796                            
                       http://website-local.lndo.site:8000/              
                       https://website-local.lndo.site/                  
 MAILHOG URLS          http://localhost:32794                            
                       http://mail.website-local.lndo.site:8000/    

Database access, Source files and Services

Database access

To gain access to the database locally use Sequel Pro or another similar application. Use the below connection credentials:

Host: 127.0.0.1
Username: lemp
Password: lemp
Database: lemp
Port: [Port number generated by Lado]

every time a development environment is started Lando will create random port numbers for services such as databases and mailhog. To get retrieve these port number enter the below terminal commands in the project folder:

lando info

Lando will list out useful information on the current running environment. The database port number value can be founf under the external_connection variable.

Importing a database

If you wish to import a database via the Lando CLI please refer to the official documentation

Source files

By default this repository is setup to use WordPress. However any source files can be added to the project.

The Lando configuration in the repo exposes /web/sites/default to port 80 so source files should be placed here.

WP Config

A default wp-config.php has been added to the /web/sites/default. Do not change or remove this document.

wp-config.php will automatically load in a file called wp-config-local.php when using a local development environment. wp-config-local.php is located in the project root directory. You can amend this file but do no move it.

Loaded Services

Lando will also load the MailHog services. This service will catch outgoing mail from the development server.

To access the MailHog GUI navigate your browser to http://mail.website-local.lndo.site:8000 once Lando has completed loading the development environment.

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.