Giter Site home page Giter Site logo

blog-wp's Introduction

Template Wordpress

Setup environments

Setup your private environments in your system terminal

export MYSQL_ROOT_PASSWORD=some_password export MYSQL_DB_USER=some_mysql_db_user export MYSQL_DB_PASSWORD=somemysqldbpassword

First start setup

  1. Run services docker-compose up -d
  2. Go to the admin panel http://127.0.0.1/wp-login.php
  3. Setup Wordpess
  4. Create db_dump folder mkdir db_dump
  5. Create a db dump docker exec db sh -c 'exec mysqldump wordpress -uroot -p"$MYSQL_ROOT_PASSWORD"' > ./db_dump/wordpress.sql

Start setup

  1. docker-compose up -d db - run the db service
  2. docker exec -i db sh -c 'exec mysql -uroot -p"$MYSQL_ROOT_PASSWORD" wordpress' < ./db_dump/wordpress.sql - restore your database
  3. docker-compose up -d - run other services

Before stopping docker containers

  1. docker exec db sh -c 'exec mysqldump wordpress -uroot -p"$MYSQL_ROOT_PASSWORD"' > ./db_dump/wordpress.sql
  2. git add .; git commit -m "The DB was changed. Some changes"; git push origin main

Creating database dump

docker exec db sh -c 'exec mysqldump wordpress -uroot -p"$MYSQL_ROOT_PASSWORD"' > ./db_dump/wordpress.sql

Restoring data from dump files

docker exec -i db sh -c 'exec mysql -uroot -p"$MYSQL_ROOT_PASSWORD" wordpress' < ./db_dump/wordpress.sql

Admin panel

http://127.0.0.1/wp-login.php

Administrator:

  • login - admin
  • pass - synergy_admin

User:

  • login - synergy_user
  • pass - synergy_root_2023

Web user interface

Main - http://127.0.0.1

Auth - http://127.0.0.1/wp-login.php

A data removing

Temporary data is stored in the docker volumes

  1. Show the docker volumes:

docker volume ls

  1. Recognize our volumes:

volume will be named by mask

[folder-name]_[volumename]

for example, if our project is located in the "blog-wp" folder, then volume names will be as follows:

blog-wp_dbdata blog-wp_wordpress

  1. Removing volumes docker-compose down - stop and remove containers docker volume rm blog-wp_dbdata docker volume rm blog-wp_wordpress

blog-wp's People

Contributors

pavelusov avatar

Watchers

 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.