I just created a fresh sage installation on a local wordpress environment, but when I activate the theme and visit my site, it shows a completely blank page (no wp tool bar).
These are the exact steps I took:
mkdir sage-site && cd sage-site
-
docker-compose up -d
(see docker-compose file below) - visit localhost:8000 and go through the wordpress installation
cd wp-content/themes
-
composer create-project roots/sage sage
(then go through the install options like theme name etc) - Visit localhost:8000/wp-admin and activate the sage theme
- Visit localhost:8000 (see a blank page)
What I tried:
- Going to wordpress settings and setting front page to static page (the sample page)
- I tried editing the index.php file in the /resources folder and it seems this is what is being displayed. I added an echo in there and sure enough I see it when I visit localhost:8000
- Doing
yarn build
,yarn build:production
andcomposer install
- Starting the whole process from scratch, but using npm instead of yarn
- Setting
"devUrl": "http://localhost:8000",
inside the resources/assets/config.json file (see full config below)
/resources/assets/config.json:
{
"entry": {
"main": [
"./scripts/main.js",
"./styles/main.scss"
],
"customizer": [
"./scripts/customizer.js"
]
},
"publicPath": "/wp-content/themes/sage",
"devUrl": "http://localhost:8000",
"proxyUrl": "http://localhost:8000",
"cacheBusting": "[name]_[hash:8]",
"watch": [
"app/**/*.php",
"config/**/*.php",
"resources/views/**/*.php"
]
}
docker-compose.yaml:
version: '3'
services:
# Database
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
networks:
- wpsite
# phpmyadmin
phpmyadmin:
depends_on:
- db
image: phpmyadmin/phpmyadmin
restart: always
ports:
- '8080:80'
environment:
PMA_HOST: db
MYSQL_ROOT_PASSWORD: password
networks:
- wpsite
# Wordpress
wordpress:
depends_on:
- db
image: wordpress:latest
ports:
- '8000:80'
restart: always
volumes: ['./:/var/www/html']
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
networks:
- wpsite
networks:
wpsite:
volumes:
db_data: