This documentation is for WSO2 Stratos 2.0.0. View the latest Apache Stratos documentation.
Wordpress Guide - Stratos 2.0.0 - WSO2 Documentation
Skip to end of metadata
Go to start of metadata


Login to Stratos2.0

  1. Login to Stratos 2.0 using CLI.

  2. Subscribe to the PHP Cartridge

    stratos>subscribe php myweb --repoURL <git-repo-url> --username <username> --password <password>



    Command Argument Description

    PHP Cartridge
    Alias name for the PHP application.
    URL of the GIT repository.
    usernameUsername for provided GIT account.
    Password for provided GIT account.


The provided PHP Cartridge is configured to except the following folder structure in order to work.

simplesamlphp  sql  www

Where the www folder contains wordpress php files. For samples please go to .


Uploading WordPress

  1. Checkout the tenant repo into a folder of your choice.

    $ git clone

  2. When prompted , enter the tenant username and password .
  3. Change the current working directory to wordpress 

    $ cd wordpress
  4. List the folder.  

    $ ls


    simplesamlphp  sql  www
  5. Copy wordpress/* files into the www folder. 
    If you do not have the WordPress files initially go to  

    $ git add www/*


  6. Commit to local repository.  

    $ git commit -a -m “initial commit”

     Command Argument Description


    The option to automatically stage all tracked, modified files before the commit.

    -mThe option to provide the commit message on the command line.


  7. Push the changes to the remote repository.  

    $ git push


Setting up a database

  1. Subscribe to the MySQL database cartridge.  

    stratos>subscribe mysql mywebdb

     Command Argument Description

    mysql MySQL Cartridge.
    mywebdb Alias for MySQL database Cartridge


  2. Request for MySQL database Cartridge information.  

    stratos> info mywebdb


  3. Add an entry in the /etc/hosts file for to be able to access the URL shown in the output of the above command.

    <ELB IP>

  4. Go to
  5. Login using the credentials given in the Cartridge Info output. The username is root.

Creating a Database

  1. On the phpmyadmin menu, click Databases .
  2. Enter the DB name in the Create new database text-box.
    For example, mywebdb
  3. Add an entry in the /etc/hosts file for to be able to access the URL shown in the output of the command when requesting for database information.

    <ELB IP>

  4. Go to
    This request is sent to the WSO2 elastic load balancer. The user can access their application running on the PHP Cartridge through the load balancer.  

Running the Installer

  1. Go to and access it.
    The run install page will appear. 

  2. Click Run the install to continue installing WordPress.
  3. Enter the details that you get when executing info mywebdb command.

    Host                :
    Database Username   : root
    Password            : vkgrrnox

  4. Click Submit.
    Now the website is ready for use.

  • No labels