--- layout: default title: Getting started with Fig and Wordpress --- Getting started with Fig and Wordpress ====================================== Fig makes it nice and easy to run Wordpress in an isolated environment. [Install Fig](install.html), then write a `Dockerfile` which installs PHP and Wordpress: ``` FROM orchardup/php5 ADD http://wordpress.org/wordpress-3.8.1.tar.gz /wordpress.tar.gz RUN tar -xzf /wordpress.tar.gz ADD wp-config.php /wordpress/wp-config.php ADD router.php /router.php ``` This instructs Docker on how to build an image that contains PHP and Wordpress. For more information on how to write Dockerfiles, see the [Dockerfile tutorial](https://www.docker.io/learn/dockerfile/) and the [Dockerfile reference](http://docs.docker.io/en/latest/use/builder/). Next up, `fig.yml` starts our web service and a separate MySQL instance: ``` web: build: . command: php -S 0.0.0.0:8000 -t /wordpress ports: - 8000:8000 links: - db db: image: orchardup/mysql ports: - 3306:3306 environment: MYSQL_DATABASE: wordpress ``` Our Dockerfile relies on two supporting files - first up, `wp-config.php` is the standard Wordpress config file with a single change to make it read the MySQL host and port from the environment variables passed in by Fig: ```