Example: using a symlink app to speed up a WordPress site

A basic WordPress installation on Opalstack is served via a back-end Apache server running behind a front-end Nginx proxy.

Nginx excels at serving static content efficiently, so you can speed up WordPress a bit by serving its images and other media directly from Nginx via a symlink application:

1

Create a WordPress application if you have not done so already.

The rest of this example will use wp for the application name and myuser for the related shell user name.

2

Create a new symlink application with the following values:

  • Type: "Nginx Static Only (Symbolic Link)"
  • Symbolic Link Path: /home/myuser/apps/wp/wp-content/uploads/ (replace myuser and wp with your shell user and app names)
  • Name: whatever you like. For this example we'll use wp_uploads_symlink
3

Create a site to serve the applications from steps 1 and 2 with the following URI routes:

  • The wp app: /
  • The wp_uploads_symlink app: /wp-content/uploads

After you've saved the site, your WordPress media will be served by the front-end server and your site should be a bit faster.