Skill Level: Any Skill Level

The purpose of the article is explain how to configure a Bluemix environment for Wordpress and how to install the product and avoid common issues of this process.


  • Bluemix account
  • Wordpress 4.8.1

The recipe assumes a basic knowledge of IBM Bluemix concepts, basic knowledge of PHP and Wordpress



  1. Create Bluemix PHP application

    Login into Bluemix (https://console.bluemix.net/dashboard/apps)


    Open the catalog (https://console.bluemix.net/catalog/) and create a CloudFoundry application using the PHP Buildpack


    Fill the applicatoin name field, in this recipe we’re going to use ‘WordPressSample‘ as application name


    This application will be located under a space called ‘dev‘ representing a development environment. Push the ‘Create‘ button to finish the procedure.
    You can review the application’s resources in the ‘Overview‘ section, from this area you can reconfigure the amount of instances and memory assigned to it. Consider the use of monitoring and auto-scaling services to improve the access to the information about the performance and take advantage of the best strategy to balance cost and performance.


  2. Create MySQL database in Bluemix

    Click on the Catalog link at the right-top of the page.


    Then click on the Data & Analytics option in the left menu, look for Compose for MySQL and click on it to create an instance of this service.


    Fill the creation for, locating the service under the same sapce (‘dev‘ in our recipe) and change the value of Connect to combo field to WordPressSample, finally push the Create button at the end of the form.


    You’ll see a dialog that will ask you the restage the application, push Restage and continue.



    You can verify that the new MySQL database service was linked to the PHP Application created previously.



    Click on the View credentials button of MySQL service box, then you’ll see a dialog with the service configuration and credentials in JSON format, look for the uri attribute and copy the value for future use (Alternatively, you can press the copy icon at the top-right side of the text area to copy all the content directly).

    MySQL-CredentialsDialogThe sample is:

    “uri”: “mysql://admin:PASSWORD@bluemix-sandbox-dal-9-portal.8.dblayer.com:29205/compose”

    This url value is composed of the following fields, we’ll need to use the values of these fields in the next steps.


  3. Enable Continous Delivery with Orion IDE

    At this point, we finished the Bluemix components creation, so we can proceed to upload the WordPress application to the Bluemix environment. There are several ways to do it, some of them are:

    • Get the base application package and push it with the Cloudfoundry or Bluemix CLI.
    • Prepare a GIT repository, configure an automated Pipeline, and deliver the content to the GIT repository for automated build & deploy.
    • Enable the ‘Continuous delivery‘ feature, and use the Online IDE (Orion) to deploy the files manually. This is the option of our recipe.


    Go to the PHP Application created in the first step, under the Overview section you’ll find and area called Continuous delivery, push the Enable button of this section.


    This is the default template of ToolChain for Continuous delivery.


    Scroll down the initial form and look for the Git Repos and Issue Tracking options, then change the value of Repository type to New and press the Create button.


    Click on the Eclipse Orion Web IDE box.



    This is the initial Orion perspective


  4. Prepare WordPress files and configuration

    Go to the top menu bar and click on File->Import->HTTP, you’ll see a small input bar at the top of the IDE, you need to fill it with ‘https://wordpress.org/latest.zip‘ and press Submit (Leave the ‘Unzip: *.zip files’ option checked).



    The result is a new directory called wordpress, as you can see this content locates our product under /wordpress path.



    Make a right click on the root’s WordPressSample item and select New->Folder, assign .bp-config as name. Then use the same method to create the file .bp-config/options.json with the following content:

    “PHP_EXTENSIONS”: [“bz2”, “zlib”, “curl”, “mcrypt”, “mysql”]

    The final result is:



    Rename wp-config-sample.php to wp-config.php and edit its mysql configurations using the values copied in the previous step.



    Deploy the application using the button with the play icon (Triangle pointing to the right) in the top bar of the IDE.


  5. Install WordPress

    Access to http://wordpresssample.mybluemix.net/wordpress/wp-admin/install.php and complete the installation. These are the screenshots of the wizard for this recipe.




    Login to http://wordpresssample.mybluemix.net/wordpress/wp-login.php with the purpose of verify the result


    Look at the administration panel


    Check the main application with the default post


    The recipe is completed, you’ve got your WordPress instance running in Bluemix!!!


  6. Conclusion

    This recipe shows that is simple and possible build an environment for WordPress in Bluemix.


    Next steps

14 comments on"Deploy and configure WordPress in Bluemix"

  1. You have done a great job!

  2. Thanks for sharing, worked first time!! Very helpful 🙂

  3. Hi Wureta. Thanks for sharing this. One question will the extensions and files persist to any retart or restage of the app?

  4. For more enterprise PHP web applications, try running a LAMP server on Bluemix and then deploy your PHP site.
    Here is a guide to how you would run a LAMP server on Bluemix. https://github.com/Twanawebtech/LAMP-Stack

  5. Works very good ! Thanks for sharing 😀

  6. All media will be destroyed at restart of the app. Need the step with Cloud Object Storage.

  7. HweeLeeYeo June 30, 2018

    Options.Json –
    “PHP_EXTENSIONS”: [“bz2”, “zlib”, “curl”, “mcrypt”, “mysql”]
    is not working due to PHP_Extensions changes.

    If “bz2”, “zlib”, “curl”, “mcrypt” are now default, what do I need to do to add “mysql”?

  8. Any solution to this (in particular Cherryclass lasts comments, as well as options.json issue with mysql?

    • {
      “require”: {
      “php”: “7.*”,
      “ext-mbstring”: “*”,
      “ext-mysqli”: “*”,
      “ext-pdo”: “*”,
      “ext-pdo_mysql”: “*”

      for mysql and other just to WordPress

  9. {
    “require”: {
    “php”: “7.0.*”,
    “ext-mbstring”: “*”,
    “ext-mysqli”: “*”,
    “ext-xml”: “*”,
    “ext-pcre”: “*”,
    “ext-json”: “*”,
    “ext-pdo”: “*”,
    “ext-pdo_mysql”: “*”

    found this in my old file. PHP instance not seems to be a good way for WordPress. You could try on cluster : you will have acces on your files and if you take an NTFS volume, no problem on restart.

  10. I have finally found out where my mistake lies. It was the ” quote error.

    Finally, here is my options.jsons that works – adding “gd” required for image processing.

    “PHP_EXTENSIONS”: [“bz2”, “zlib”, “curl”, “mcrypt”, “gd”, “mbstring”, “mysqli”, “zip”, “mongo”, “iconv”, “openssl”, “mysql”]

Join The Discussion