This documentation is for WSO2 Stratos 2.0.0. View the latest Apache Stratos documentation.
Page Comparison - Wordpress Guide (v.27 vs v.28) - Stratos 2.0.0 - WSO2 Documentation

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Table of Contents


Login to Stratos2.0

  1. Login to Stratos 2.0 using CLI.

  2. Subscribe to the PHP Cartridge

    Code Block
    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.

    Code Block
    $ git clone

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

    Code Block
    $ cd wordpress
  4. List the folder.  

    Code Block
    $ ls


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

    Code Block
    $ git add www/*


  6. Commit to local repository.  

    Code Block
    $ 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.  

    Code Block
    $ git push


Setting up a database

  1. Subscribe to the MySQL database cartridge.  

    Code Block
    stratos>subscribe mysql mywebdb

     Command Argument Description

    mysql MySQL Cartridge.
    mywebdb Alias for MySQL database Cartridge


  2. Request for MySQL database Cartridge information.  

    Code Block
    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.

    Code Block
    <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.

    Code Block
    <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.

    Code Block
    Host                :
    Database Username   : root
    Password            : vkgrrnox

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