Skip to content

lugosidomotor/DockerLocalWordPress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Run Existing WordPress Site Locally With Docker

Overview 🌟

Easily set up a local development environment for your existing WordPress site using Docker. This solution is ideal for developing and testing in an environment that mirrors your live site.

Requirements 🛠️

  • Docker and Docker Compose installed.

Containers 📦

  1. WordPress Container:

    • Volumes:
      • site/wp-content: Place your production wp-content folder here. It includes themes, plugins, uploads, etc. 🎨
  2. Database (DB) Container:

    • Volumes:
      • mysqldumps/backup.sql.gz: Put your production database snapshot here. It's imported automatically on first run. 🔄
      • init/migrate.sh: URL migration script, runs automatically. 🌐

Setup 🔧

  1. Clone/Download: Get the project files. 👨‍💻
  2. Database Prep: Create a dump from the live database and save it as mysqldumps/backup.sql.gz. 🗃️
  3. Content Prep: Copy wp-content from your site to site/wp-content. 📂
  4. Configuration: Set variables in .env. 📝
  5. Run: In the project root, execute:
docker-compose up -d && docker exec -ti wordpress '/prep.sh'

Access your site at http://localhost and the admin panel at http://localhost/wp-admin. 🌍

Enjoy a seamless and efficient development process for your WordPress site! 🎉

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published