Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/piyushchauhan2011/wordpress-learning
Wordpress local setup with tests, plugins and themes using wp-cli
https://github.com/piyushchauhan2011/wordpress-learning
Last synced: 16 days ago
JSON representation
Wordpress local setup with tests, plugins and themes using wp-cli
- Host: GitHub
- URL: https://github.com/piyushchauhan2011/wordpress-learning
- Owner: piyushchauhan2011
- Created: 2023-07-18T11:39:37.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-19T01:05:18.000Z (over 1 year ago)
- Last Synced: 2024-10-09T17:43:31.108Z (27 days ago)
- Language: Shell
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wordpress + mysql with tests, plugins and themes
```bash
brew install wp-cli
wp core download
brew install mysql
mysql -u root -p
create database wp_dev;
quit
wp server # configure the wp-config.php file
wp config shuffle-salts # if required, links in wp-config file to generate via web
cd wp-content/plugins/new-plugin
composer install
npm install # node v16 and npm v7 are required for this to work
npm run build
bash ./vendor/bin/install-wp-tests.sh wp_dev_test root '' localhost latest # to install the test database
# check wordpress-tests-lib/ folder exists and has data and includes folder
# if not delete folders /wordpress and /wordpress-tests-lib, temp-path is the path returned by the install-wp-tests.sh script./vendor/bin/phpunit # to run tests, only phpunit v9 is supported, phpunit v10 doesn't work
# only local mysql server is supported, unable to work with docker mysql server
wp db import # check wp db --help for more options
wp db query < query.sql
```