SiteHost

Example - Wordpress

Before following this guide, we recommend reading through the Getting Started article to understand the basics of how to run your Cloud Container images locally.

  1. Follow the Quick Start guide so you have a PHP web server, database and PHPMyAdmin container running locally.
  2. In the application/public directory, download and extract the Wordpress files.

    If you created an index.php file during the Quick Start guide, remove it first with rm index.php.

    cd application/public
    wget https://wordpress.org/latest.tar.gz
    tar --strip-components=1 -xzvf latest.tar.gz
  3. Login to MySQL as using the password defined in Step 1
    docker exec -it mariadb1011 bash
    mysql -u root -p
  4. Create the wordpress database
    mysql> CREATE DATABASE wordpress;  
  5. Create the Wordpress database user. This will create a MariaDB user with the username wordpress. Replace securepassword with a secure password for this user.
    mysql> CREATE USER 'wordpress'@'%' IDENTIFIED BY 'securepassword';
  6. Create the Wordpress user privileges over the wordpress database.
    mysql> GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'%';
  7. Exit the MariaDB shell

    mysql> FLUSH PRIVILEGES; 
    
    mysql> EXIT  
  8. Go to http://localhost:8001/ and configure Wordpress to use your new database wordpress_db_config