Advanced WordPress

WordPress is a powerful web publishing platform. You can use some of WordPress’s more advanced features or tweak your WordPress deployment for better performance.

See also

WordPress is a PHP-based application. Please see PHP and Static Files, CGI Scripts, and PHP Pages for additional documentation.

Serving Uploads Faster

To improve performance for your WordPress application, create a symbolic link application to serve your WordPress application’s media directly. To create and configure the symlink application:

  1. Log in to the control panel.
  2. Click Domains / websites ‣ Websites. The list of websites appears.
  3. Click the name of the website that contains the WordPress application.
  4. Click Add an application ‣ Create a new application. The Create a new web app form appears.
  5. In the Name field, enter a name for the application.
  6. In the App category field, click to select Symbolic link.
  7. In the App type field, click to select Symbolic link to static-only app.
  8. In the Extra info field, enter /home/username/webapps/wordpress/wp-content/uploads/, where username is your username and wordpress is the name of the WordPress application.
  9. In the URL field, enter wp-content/uploads for WordPress applications mounted at the root of a domain (/) or enter path/wp-content/uploads where path is the URL path for the WordPress application.
  10. Click the Save button. The application is installed and added to website’s list of applications.
  11. Click the Save button. The changes to the website are saved.

Now the files in wp-content/uploads are served by your server’s front-end process directly, bypassing the PHP interpreter.

Caching WordPress

To help your WordPress application handle a larger number of visits, you can automatically cache many pages of your WordPress application using the WP Super Cache plugin. To install WP Super Cache:

  1. Log in to WordPress.
  2. Click Plugins ‣ Add New. The Install Plugins page appears.
  3. In the search field, enter WP Super Cache and click Search Plugins. The Search Results table appears.
  4. Under WP Super Cache, click Install Now. The Installing Plugin page appears.
  5. Click Activate Plugin. The Plugins page appears with a table of installed plugins.
  6. Under WP Super Cache, click Settings.
  7. If Permlink Structure Error appears:
    1. Click Permalinks Options Page. The Permalink Settings page appears.
    2. In the Common settings section, select a permalink URL scheme other than Default.
    3. Click the Save Changes button. A Permalink structure updated notification appears at the top of the page.
    4. In the sidebar, click Settings ‣ WP Super Cache. The WP Super Cache Settings page appears.
  8. Click to select Caching On (Recommended).
  9. Click the Update Status button.

Now, static pages will be served to your users instead of dynamically generated pages where possible.

Using Multisite

As of WordPress version 3.0, WordPress MU has become part of the core WordPress software. With the Multisite features of WordPress 3.0, you can create a network of WordPress blogs from a single installation of WordPress using subpaths (for example, example.com/blog1, example.com/blog2, etc.) or subdomains (for example, blog1.example.com, blog2.example.com, etc.). To use the Multisite feature of WordPress to create a blog network:

  1. Create a WordPress site and application.

    1. Log in to the control panel.

    2. Click Domains / websites ‣ Websites. The list of websites appears.

    3. Click the Add new website button. The Create a new website form appears.

    4. In the Name field, enter a website name.

    5. For each domain name you want to use with the website, add it to the list of domains. In the Domains field, enter the domain name. Enter one or more domain names. If the domain has not yet been added to the control panel, click the Create link that appears at the bottom of the list of domains to add it.

      Note

      If you’re planning to use subdomains for multisite blogs (like marysblog.example.com and johnsblog.example.com), add a wildcard subdomain for the domain name (or names) for the site.

      For example, if you entered example.com in the Domains field, also add *.example.com.

    6. Click Add an application ‣ Create a new application. The Create a new web app form appears.

    7. In the Name field, enter a name for the WordPress application.

    8. In the App category menu, click to select WordPress.

    9. Click the Save button. The application is installed and added to website’s list of applications.

    10. Click the Save button. The website is created and added to the list of websites.

  2. Wait two minutes while the website record changes take effect.

  3. Enable WordPress Multisite.

    1. Open ~/webapps/app/wp-config.php in a text editor.
    2. On a new line beneath <?php, add define('WP_ALLOW_MULTISITE', true);.
    3. Save and close the file.
  4. Configure WordPress Multisite.

    1. Log in to WordPress.
    2. In the menu on the left, click Tools ‣ Network. The Create a Network of WordPress Sites page appears.
    3. Click to select the address type you would like to use for blogs on the WordPress network:
      • Choose Sub-domains for network blogs to use subdomains to form URLs (like marysblog.example.com and johnsblog.example.com).
      • Choose Sub-directories for network blogs to use subdirectories to form URLs (like example.com/marysblog and example.com/johnsblog).
    4. In the Network Details section, adjust any preferences as desired.
    5. Click the Install button. The Enabling the Network page appears.
    6. The Enabling the Network page provides several important steps to complete the setup. Complete the directions provided before continuing.
    7. Log out of the WordPress site.

You can now make and manage new Multisite blogs: login to the WordPress Dashboard and use the Super Admin module in the menu.