Giter VIP home page Giter VIP logo

wordpress-docker's Introduction

Simple docker based environment for WordPress plugins and themes development.

Requirements

  • docker (native, no boot2docker)
  • docker-compose

Launch the environment

Be sure you have nothing running on port 80, and also that you are using the native version of Docker.

$ ./restart.sh

You should now be able to access the WordPress instance on http://localhost and the admin panel on http://localhost/wp-admin/.

If you get a lot of errors like the following, simply restart docker:

Warning: copy(/var/www/html//wp-content/themes/twentyfourteen/category.php): failed to open stream: No such file or directory in phar:///bin/wp/php/commands/core.php on line 220

Launch environment without loosing database state

If at some point you containers stopped and you don't want to loose your database state, simply run:

$ docker-compose up

Connect to the WordPress admin UI

Go to http://localhost/wp-admin/

Admin user credentials:

  • login: admin
  • password: admin

Debugging

The whole WordPress dir is mounted as a volume so that you can edit anything on the fly in ./wordpress.

Developing WordPress plugins and themes

Simply drop your plugins in the wordpress/wp-content/plugins directory or your themes in the wordpress/wp-content/themes directory.

As an alternative you could also directly upload zip archives via the admin UI.

You should now be able to enable the themes and plugins from the WordPress backoffice.

No need to restart the docker container as the whole WordPress directory is mounted as a volume. You can modify any file on the fly.

Also note that when you restart your container, plugin and theme files are kept, only core files and database will be reset.

wordpress-docker's People

Contributors

rayrutjes avatar nicolasbettag avatar igorradovanov avatar bentoumitech avatar redox 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.