Skip to content

A docker-compose environment for developing Wordpress websites within

Notifications You must be signed in to change notification settings

burnbright/wordpress-dev-environment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress Local Development Environment

This project provides a way to run/develop WordPress sites locally, before publishing changes to a live site.

The primary tool to do this is Docker.

Usage

Kick off the web and database servers with docker:

docker-compose up

Introducing a site

Add each WordPress site to the sites directory.

If your website folder is my-website, the resulting website should be visible at: http://locahost/my-website/

Add database

Use a MySQL client to connect to the local database running at: localhost:4306

Updating URLs

The URLs in the database need to up updated for the site to work locally.

UPDATE wp_options SET option_value = REPLACE(option_value, 'http://my-website.com', 'http://localhost/my-website');
UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://my-website.com', 'http://localhost/my-website');

Don't forget to do the reverse if uploading database to a live server.

About

A docker-compose environment for developing Wordpress websites within

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published