Sometimes, you may notice your WordPress site runs slowly or doesn't run as well as it should on DreamPress. There are several reasons this can occur.
This article describes some steps you can take to address issues that commonly lead to slow or inefficient websites on DreamPress.
DreamPress has built-in server caching, creating a static version of your site. This helps your server use fewer resources, allowing your site to load faster while managing larger traffic.
Many guides recommend caching plugins such as WP Super Cache on WordPress sites. However, since DreamPress comes with built-in caching, third-party caching plugins are unnecessary and could even conflict with the built-in DreamPress cache.
You should, however, keep an updated version of the Nginx Helper plugin, as it provides helpful tools to manage your DreamPress site's cache.
Checking your plugins
Certain plugins might be written in a way that interferes with properly caching your site's pages and content. For optimizing plugins in general, see the following article:
Checking your theme
While the available themes on wordpress.org are free and safe, some are better than others. When shopping for a theme, search online to determine if users have complained about speed issues while using it. These results can greatly help you determine which theme is best for you.
A quick way to check if your theme is causing issues with your site is to revert to the default theme (such as 'Twenty Seventeen') and see if that resolves any issues with your site.
To change the default theme:
- Log into your WordPress site's panel.
- In the left pane, click Appearance > Themes.
- Search for the default 'Twenty Seventeen' theme.
- Click the Activate button.
Once your site uses the Twenty Seventeen theme, use the tool mentioned above to check if this improves your site's performance.
Checking your database
Using the WP-DBManager plugin to optimize your database
You should routinely optimize your site's database to avoid a "fragmentation" effect. The simplest way to do this is to use the WP-DBManager plugin, which includes a function to optimize your database and schedule this optimization to run at a desired time (recommended once per month at least).
View the 'Managing WordPress plugins' article for instructions on how to install a plugin.
Once installed, click 'Database' in the left pane:
Then, click Database > Optimize DB in the left pane.
In the center pane you'll see a list of your database tables. Click the Optimize button at the bottom.
Using wp-cli to optimize your database
You can also use wp-cli to optimize your database.
To optimize your database using wp-cli:
- Log into your server via SSH.
- Make sure you're in your WordPress site's directory. Make sure to change username to your Shell user.:
[server]$ cd /home/username/example.com
- Run the following command to view all database command options:
[server]$ wp help db
- To optimize the database, run the following:
[server]$ wp db optimize
Using SSH to optimize your database
See the following article for details on how to optimize your database via SSH:
Using phpMyAdmin to optimize your database
See the following article for details on how to optimize your database via phpMyAdmin:
Checking the size and contents of your wp_options table
In addition to optimizing your database, it's useful to check the size of your wp_options table. Typically, this table should be under 1 MB, but plugins and other customizations can make this much larger. You will typically notice some slowness on your site if this table is over 3 MB.
Determining which pages receive the most visitors
Every DreamHost website stores access.log information about the site. These logs can become very large and difficult to read, but you can run a few commands to quickly tell which site is receiving the most traffic. See the following article for further information:
Optimizing image sizes
The size of your images can often cause a site to load slowly. The larger an image, the longer it takes to download on the visitor's end. Ensure your images are as small as possible while preserving their quality. You can use a free site like https://tinyjpg.com/ to compress and optimize your images. You can also use a plugin to help you do that, such as:
Minifying your scripts
Are there any missing files in my WordPress installation?
Your WordPress installation may be missing certain key files. This can result in 404 errors and cause a server to work harder than normal as it tries to find them. This results in considerably slower load times, especially on popular websites.
One of the most common missing files is the favicon (favicon.ico) file. DreamHost automatically generates a blank favicon for all domains by default, but if you notice it's missing, you can easily create a new one.
Adding a favicon if one doesn't already exist is simple to do. You can add one using an FTP client or by logging into your server via SSH. Once logged in, create a blank file in your website's directory.
If you create it via SSH, run the following commands after logging in. Make sure to change username to your Shell user.
[server]$ cd /home/username/example.com [server]$ touch favicon.ico
The touch command creates a blank favicon.ico file. A blank icon is far better than a missing one since your server will not work harder looking for it.
You can run your site through Pingdom Tools to check for any other missing files. A single pass through the site shows you any missing files that can cause your site to load slowly. Simply look for filenames in red and then either replace them or remove references to them in your themes or posts.
Other common issues for poor performance
Using online tools to troubleshoot your website
Site load analysis tools
There are various online tools you can use to analyze your website. These types of tools can provide insights into how your website is performing, identify issues that are causing your site to load slower than expected, and even recommend solutions to help you troubleshoot further.
View the following article for a list of tools you can use to troubleshoot your site:
The following are a few recommended browser tools to help you troubleshoot performance issues with your WordPress site:
- Firebug — A very handy tool that displays what is loading and how long it takes.
- YSlow — A companion to Firebug that can provide some pointers on what to fix and how.
- Web Inspector — Built into Chrome and Safari, it provides much of the same information as Firebug.
You can use the following tool to check your DreamPress server:
- Load Impact — A load testing service that hits your server with many simultaneous users. The free version provides a 50-user test. Be sure that you have caching enabled before running it. During this process, you can watch the CPU load with top, RAM levels with free -m, or both with vmstat 1 (Ctrl + C to stop).
- Managing WordPress plugins
- Managing the DreamPress cache
- Fine tuning WordPress revisions
- WordPress anti-spam plugins
- Managing WordPress themes