Installing WordPress

Using Flex Clouds for when WP is Required

There are two ways to install WordPress in a Flex Cloud. The Traditional Way gets you a very basic WordPress installation. The recommended way installs Composer and wp-cli, a command line tool that makes setting up WordPress correctly with common and recommended plug-ins more convenient.

Friendly URLs for WordPress should work out of the box in MODX Cloud, but you may need to edit your nginx web rules depending on where you wish it installed. See examples 14 and 15 on our Web Rules user guide page.

Use wp-cli for Added Options

Installing via wp-cli lets you do many things WP-related when logged into the command line:

  1. Create a new Flex Cloud instance for your WordPress site. Make note of the internal Cloud URL, which looks something like c**** You will also need the database credentials in the steps below.

  2. After your Cloud has been created, open your terminal, shell or Putty to login via ssh into your new Flex Cloud instance and change directories into your web root:

    cd www
  3. Download and install wp-cli (you’ll get Composer, too):

    curl | sh
  4. Install WP via wp-cli into webroot: "/www":

    wp core download
    wp core config --dbhost= --dbname=instance_c****_flex --dbuser=c**** --dbpass=xxxxxxxxxx --dbprefix=wp_
    wp core install --title="Hello WP!" --admin_user="your-username" --admin_password="please-put-something-secure-here" --admin_email="" --url=""
  5. You further use wp-cli to install caching and SEO plugins that most WP sites should use, like W3 Total Cache, Yoast SEO, Login Lockdown, WP Mail SMTP (so you can use an ESP for better email deliverability) and Export Plus (for easier migrations to Revo!):

    wp plugin install w3-total-cache
    wp plugin install wordpress-seo
    wp plugin install login-lockdown
    wp plugin install wp-mail-smtp
    wp plugin install export-plus
  6. You can also use wp-cli to add admin users to your installation:

    wp user create username --role=administrator

The Traditional Way

Alternately, you can install WordPress the old fashioned way.

  1. First, ssh into your Flex Cloud instance and grab WP from the source:

    cd www
    curl -J -L -o ./wp.tar.gz
  2. To install into webroot:

    tar zxvf wp.tar.gz -C ./

    Alternately, to install into /wp:

    tar zxvf wp.tar.gz
    cd wp
  3. Setup the WordPress config file:

    mv wp-config-sample.php wp-config.php
    nano wp-config.php
  4. Fill in your database credentials from your Cloud Dashboard et viola!

  5. Visit your web root to complete the WP installation.

Have more questions? Submit a request


Please sign in to leave a comment.