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, you can create a symbolic link application to serve your WordPress application’s media directly. To create the symlink application:
- Log in to the WebFaction control panel.
- Create the symbolic link application.
- Click Domains / websites ‣ Applications. The Apps list appears.
- Click the Add new (
) button. The Add
page appears. - In the Name field, enter a name for the symbolic link application.
- In the App category menu, click to select Symbolic link.
- In the App type menu, click to select Symbolic link to static-only app.
- 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 as it appears on the control panel.
- Click the Create button.
- Update your WordPress site’s website record.
- Click Domains / websites ‣ Websites. The Sites table appears.
- In the row for the website record that the WordPress is attached to, click
the Edit (
) button. The Edit page appears. - In the site apps table, click the Add new (
)
button. A new row appears in the table. - In the app menu, click to select the symbolic link application you created previously.
- In the URL path 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.
- Click the Update button.
Now the files in wp-content/uploads will be 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:
Log in to the WordPress dashboard.
See also
Click Plugins ‣ Add New. The Install Plugins page appears.
In the search field, enter WP Super Cache and click Search Plugins. The Search Results table appears.
Under WP Super Cache, click Install Now. The Installing Plugin page appears.
Click Activate Plugin. The Plugins page appears with a table of installed plugins.
Under WP Super Cache, click Settings.
If Permlink Structure Error appears:
- Click Permalinks Options Page. The Permalink Settings page appears.
- In the Common settings section, select a permalink URL scheme other than Default.
- Click the Save Changes button. A Permalink structure updated notification appears at the top of the page.
- In the sidebar, click Settings ‣ WP Super Cache. The WP Super Cache Settings page appears.
Click to select Caching On (Recommended).
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:
Create a WordPress application.
- Log in to the WebFaction control panel.
- Click Domains / websites ‣ Applications. The Apps list appears.
- Click the Add new (
) button. The Add
page appears. - In the Name field, enter a name for the WordPress application.
- In the App category menu, click to select WordPress.
- Click the Create button. The View page appears with a confirmation message. The extra_info field will also contain the generated password for the admin user.
Create a WordPress website entry.
- Click Domains / websites ‣ Websites. The Sites list appears.
- Click the Add new (
) button. The Add
page appears. - In the Name field, enter a name for the website record.
- In the Subdomains menu, click to select the desired domain for your WordPress blog network.
- In the Site apps table, click the Add new
(
) button. A new row appears in the table. - In the App menu, click to select the WordPress application.
- In the URL path field, enter /.
- Click the Create button. The View page appears with a confirmation message.
Wait two minutes while the website record changes take effect.
Enable WordPress Multisite.
- Open an SSH session to your account.
- Open ~/webapps/app/wp-config.php in a text editor.
- On a new line beneath <?php, add define('WP_ALLOW_MULTISITE', true);.
- Save and close the file.
Configure WordPress Multisite.
- Log in to the WordPress Dashboard with the admin user. You can find the login page at http://domain/wp-login.php, where domain is the domain you selected for your website record.
- In the menu on the left, click Tools ‣ Network. The Create a Network of WordPress Sites page appears.
- 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. For example, marysblog.example.com, johnsblog.example.com, and so on would use the Sub-domains selection. Subdomain-specific configuration steps will be required later in this tutorial.
- Choose Sub-directories for network blogs to use subdirectories to form URLs. For example, example.com/marysblog, example.com/johnsblog and so on would use the Sub-directories selection.
- In the Network Details section, adjust any preferences as desired.
- Click the Install button. The Enabling the Network page appears.
- The Enabling the Network page provides several important steps to complete the WordPress Multisite setup. Complete the directions provided before continuing.
- Log out of the WordPress site.
For Subdomain users only: Configure subdomains wildcard.
Note
You may opt to manually add subdomains rather than using a a wildcard. When you create an additional Multisite blog, however, you must add the new subdomain to the WordPress application’s domain and website entry or the Multisite blog will not be reachable.
- Log in to the WebFaction control panel.
- Click Domains / websites ‣ Domains. The list of domains associated with your account appears.
- In the row of the domain in use with the WordPress website, click the
Edit (
) button. The Edit page appears. - Click the Add new (
) button. A new row appears in
the Subdomains table. - In the new row’s Prefix field, enter * for a wildcard subdomain.
- Click the Update button. The View page appears with a confirmation message.
- Click the Domains / websites ‣ Websites. The Sites list appears.
- In the row of the website record for the Multisite WordPress
installation, click the Edit (
) button. The
Edit page appears. - In the Subdomains menu, add the wildcard subdomain to the selected domains.
- Click the Update button. The View page appears with a confirmation message.
You can now make and manage new Multisite blogs: just login to the WordPress Dashboard and use the Super Admin module in the menu.
