GithubHelp home page GithubHelp logo

fronix / wordpress-dockerized-environment Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rimiti/wordpress-dockerized-environment

0.0 2.0 0.0 5 KB

Wordpress Dockerized Environment.

Shell 100.00%

wordpress-dockerized-environment's Introduction

Wordpress Dockerized Environment

PRs Welcome

This repository aims to simplify the setting up of a docker-compose development environment.

Pre-requirements

First, make sure you have the latest versions of Docker and Docker Compose installed on your machine.

From a new project

  • Download latest WordPress version.
  • Unzip wordpress-x.x.x.zip archive.
  • Move all files present in the unzipped folder to src/
  • Run docker-compose up.

From an existing project

  • Move all your files to src/.
  • Copy the SQL dump file to docker/dump/.
  • Update database credentials in docker-compose.yml with your own values.
  • Run docker-compose up.

Ready

There are two ways to access to your local WordPress:

# Directly from your local machine IP.
http://127.0.0.1:80

# From a local domain (cf: Utils/WordPress section), add below line in your /etc/hosts file.
127.0.0.1 wordpress.local

Docker Compose

# To start/restart your containers
$ docker-compose up

# To start/restart your containers in background
$ docker-compose up -d

# To stop all containers
$ docker-compose stop

# To stop and remove all containers
$ sudo docker-compose down

# To remove all stoped containers
$ docker-compose rm --all

# To connect you into wordpress container
$ docker-compose exec wordpress /bin/bash

# To connect you into mysql container
$ docker-compose exec mydb.mysql.db /bin/bash

WordPress

To override the hostname without changing any data in your database add in your wp-config.php the below lines:

define('WP_HOME','http://wordpress.local');
define('WP_SITEURL','http://wordpress.local');

Scripts

# To dump MySQL 
$ bash utils/dump.sh

wordpress-dockerized-environment's People

Contributors

rimiti avatar

Watchers

 avatar  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.