-
Notifications
You must be signed in to change notification settings - Fork 4
Local development environment (install instructions)
Janos Hegymegi edited this page Nov 6, 2019
·
38 revisions
Prerequisite:
- Install
docker
anddocker-compose
.
Steps:
- Clone Git repository.
- Setup
./wp/nginx-conf
(directory and two files in it) and./wp/.env
as explained here.- Alternatively, contact us for test files and 1) replace nginx configuration with non-https version and 2) delete server line in the final nginx configuration.
- CD into
.wp
and rundocker-compose up -d
. - Open a browser and you'll find Wordpress at
localhost
. Follow the instructions. - Import DB.
- If you're on Mac, mount new volume for DB dump file by adding the following line to the
docker-compose.yml
file:./lahma_db.sql:/var/lib/mysql/lahma_db.sql
. Make sure that ./lahma_db.sql is a Lahmacun DB file. Contact us for such a test DB dump. - Restart containers: run
docker-compose down
anddocker-compose up -d
. - SSH into the corresponding container via
docker-compose exec db /bin/bash
and runcd /var/lib/mysql
. - Import DB by running
mysql -u [DB_USER] -p [DB_NAME] < lahma_db.sql
with the corresponding DB user and DB name from.env
. - Log into mysql shell by
mysql -u [DB_USER] -p [DB_NAME]
and run
- If you're on Mac, mount new volume for DB dump file by adding the following line to the
update wp_options set option_value='http://localhost' where option_name='home';
update wp_options set option_value='http://localhost' where option_name='siteurl';
You're ready to go!
Note: pictures will be missing unless you upload them.
Useful commands:
select option_value from wp_options where option_name='home';
select option_value from wp_options where option_name='siteurl';