This project allows you to install a local development environment:
- using a Docker environment.
- Using a local environment: LAMP, LEMP, XAMPP, MAMP, Laravel Valet,... One local environment where you install a web server (usually Apache or NGINX), a database (usually MySQL or MariaDB) and PHP. We will use the LAMP term to talk about this environment.
git clone [email protected]:WordPress/translate-w-org-env.git
cd translate-w-org-env
npm install
npm run start
(This will provision some items, so it will take a few minutes.You will see all updates in the CLI).- Visit site at http://localhost:8888 .
npm run start
npm run stop
npm run destroy
npm run destroy-and-provision
To access to the WordPress dashboard, you need to use:
- URL: http://localhost:8888/wp-login.php
- Username: admin
- Password: password
Docker uses a random port for the MySQL server. Take a look to this when you provision the system. The credentials to access to this server are:
- Username: root
- Password: password
- Git. Install instructions.
- A local environment with WordPress running in your local machine.
- The Bash shell in your $PATH. Check if you have the Bash in your $PATH executing
type bash
. - PHP in your $PATH. Check if you have the PHP in your $PATH executing
type php
. - MySQL in your $PATH. Check if you have the MySQL in your $PATH executing
type mysql
. - WP-CLI in your $PATH. Check if you have the MySQL in your $PATH executing
type wp
.
If you don't have WordPress in your local machine, you can install it with the WP-CLI and these commands (use your own paths and values: usernames, passwords,...):
cd /your/local/folder
wp core download
wp config create --dbname=wordpress --dbuser=wordpress --dbpass="password" --dbcharset=latin1 --dbcollate=latin1_swedish_ci
wp db reset
if you have some content in the database.wp core install --url="wordpress.test" --title="Test Site" --admin_user=admin --admin_password="password" [email protected]
Please, note that this installation is destructive and will delete the data you have in your WordPress.
git clone [email protected]:WordPress/translate-w-org-env.git
cd translate-w-org-env
- Make sure that the
provision.sh
file has execution permissions. Executechmod +x provision.sh
to give execution permissions. - Execute this command
./provision.sh -t lamp -d /Users/myuser/code/wordpress/wp
, where:-t lamp
indicates that this installation is aLAMP
type.-d /Users/myuser/code/wordpress/wp
represents the WordPress full path. Use your WordPress path and don't include a slash at the end of the path.
- Visit your local WordPress in the URL where you have installed it before.
To access to the WordPress dashboard, you need to use the same URL you used before. Use these credentials:
- Username: admin
- Password: password
This tool is inspired by WordPress Meta Environment and it is based on WordPress Theme Directory - Local development environment.
This tool uses the @wordpress/env Docker environment.