Setup Wordpress on DotCloud

5 points by spIrr ↗ HN
Since the old tutorial [1] has not yet been transitioned to the new docs [2], here is what i did:

1. Downloaded Woprdpress and unpacked it into wordpressdirectory.

2. Created dotcloud.yml in the local wordpress directory:

   www:
     type: php
   db:
     type: mysql
3. Dublicated wp-config-sample.php into wp-config.php and edited it:

   /* ADD THE FOLLOWING LINE */
   $envjson = json_decode(file_get_contents("/home/dotcloud/environment.json"),true);

   /* The name of the database for WordPress */
   define('DB_NAME', 'wordpress');

   /* MySQL database username */
   define('DB_USER', 'myusername');

   /* MySQL database password */
   define('DB_PASSWORD', 'mypassword');

   /* MySQL hostname */
   define('DB_HOST', $envjson['DOTCLOUD_DB_MYSQL_HOST'].':'.$envjson['DOTCLOUD_DB_MYSQL_PORT']);
4. Assuming i want to call my DotCloud instance wordpress, $ dotcloud create wordpress

5. $ cd mywordpressdirectory

6. $ dotcloud push wordpress

7. $ dotcloud info wordpress.db

8. $ dotcloud run wordpress.db -- mysql -u root -p(password from previous input result)

9.

   mysql> CREATE USER 'myusername' IDENTIFIED BY 'mypassword';
   mysql> CREATE DATABASE wordpress;
   mysql> GRANT ALL ON wordpress.* TO 'myusername'@'%';
   mysql> FLUSH PRIVILEGES;
10. $ dotcloud restart wordpress.www

11. Open the URL of your instance in your browser and proceed like during a normal wordpress install.

Thanks!

[1]: http://olddocs.dotcloud.com/tutorials/wordpress/

[2]: http://docs.dotcloud.com/

1 comment

[ 2.5 ms ] story [ 11.9 ms ] thread
You left out the part about pointing a real domain at it