Introduction

WordPress is one of the most popular open source Content Management Systems (CMS). In this how-to guide, you will learn how Bitnami configures WordPress, what the common issues are and how to address them.

Configuration

Bitnami offers two flavors: WordPress (for a single blog) and WordPress Multisite (for multiple blogs). Both are configured as follows:

Bundled Main Components

  • Apache
  • PHP
  • MySQL
  • OpenSSL
  • phpMyAdmin
  • Varnish

System Users

NOTE: This does not apply to Windows installers or non-root installations.

  • bitnami: SSH login user for cloud images and virtual machines.
  • daemon: Runs Apache.
  • mysql: Runs MySQL.
  • varnish: Runs Varnish.

Permissions And Ownership

NOTE: For more information about permission issues, see this guide.

  • All files in /opt/bitnami/apps/wordpress/htdocs/ are owned by the bitnami system user and the daemon group. This helps to avoid issues when uploading files to the stack.
  • All subfolders in /opt/bitnami/apps/wordpress/htdocs/ have 775 using UNIX permissions notation, which means the following:
    • Read, write, and execute: bitnami user and daemon group.
    • Read and execute: rest of system users.
  • All files in /opt/bitnami/apps/wordpress/htdocs/ except wp-config.php have 664 using UNIX permission notation, which means:
    • Read and write: bitnami user and daemon group.
    • Read: rest of system users.
  • The wp-config.php file contains sensitive information, and for that reason it has more restrictive permissions. The file has a value of 640, which means the following:
    • Read and write: bitnami user.
    • Read: daemon group.
    • No access: rest of system users.
  • Uploaded files in /opt/bitnami/apps/wordpress/htdocs/wp-content/uploads using the WordPress media library manager are owned by the daemon user and the daemon group.
  • Installed plugins in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins using the WordPress plugin manager are owned by the daemon user and daemon group.

Plugins Included

Common Issues

These are the most common issues that Bitnami WordPress users face:

  • Permissions: Includes the issues described in this troubleshooting guide. In the case of WordPress, most of them occur when uploading a file to the wp-uploads folder via FTP.
  • SSL: Includes the issues described in this troubleshooting guide. In the case of WordPress, there is an extra case which is that of mixed content issues, provoking the page to be rendered incorrectly.
  • SMTP: Includes the issues described in this troubleshooting guide.
  • SSH: Includes the issues described in this troubleshooting guide.
  • Domain names: Includes issues when assigning a domain name. These are more frequent in WordPress Multisite installations.
  • Changes in WordPress configuration files: Configuration issues can break the application, and usually occur by incorrectly changing configuration files such as wp-config.php or functions.php.
  • Infrastructure: Includes issues with the server itself, such as running out of space, performance issues due to suspicious attacks, changes in the IP after rebooting, operating system upgrades, and so on.
  • Bitnami banner: Issues can occur when removing the Bitnami banner.
  • Migration and upgrade: Problems can occur when backing up, migrating or upgrading their instance. A common case is that of moving a single WordPress installation to WordPress Multisite.
  • Plugins: Some plugins can cause the application to show a warning or directly crash. This is due to incompatibilities with the WordPress version or some special Apache requirements (such as using .htaccess files). Disabling or removing the conflicting plugin solves the issue.
  • Integration with extra components: Some users encounter issues when integrating their WordPress installation with solutions such as Memcached, CloudFront, RDS, etc.

Troubleshooting Checklist

The following checklist covers the majority of cases described above and will help you find and debug most WordPress issues.

Did You Install Any Extra Plugin To The Application?

Certain plugins may have compatibility issues with your WordPress version. If you are getting HTTP 500 errors and you have installed extra plugins, follow these steps to solve the problem:

  • Log in to your instance through SSH following this guide.
  • Once you have accessed the server, on the terminal window of your local system, search for the /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins folder.
  • Execute the ls command. You will see different folders for each of the installed plugins. The following are some examples:drwxrwxr-x 4 bitnami daemon 4096 Nov 30 00:33 akismet drwxrwxr-x 10 bitnami daemon 4096 Nov 30 00:33 all-in-one-seo-pack drwxrwxr-x 3 bitnami daemon 4096 Nov 30 00:33 all-in-one-wp-migration drwxr-xr-x 2 bitnami daemon 4096 Dec 11 15:13 conflicting_plugin drwxrwxr-x 6 bitnami daemon 4096 Nov 30 00:33 google-analytics-for-wordpress -rw-rw-r-- 1 bitnami daemon 2255 May 22 2013 hello.php -rw-rw-r-- 1 bitnami daemon 28 Jun 5 2014 index.php drwxrwxr-x 16 bitnami daemon 4096 Nov 30 00:33 jetpack drwxrwxr-x 6 bitnami daemon 4096 Nov 30 00:33 simple-tags drwxrwxr-x 3 bitnami daemon 4096 Nov 30 00:33 wp-mail-smtp
  • Identify the extra plugins you have installed. For each of them, execute the following command (replace the PLUGINFOLDER placeholder):sudo mv PLUGINFOLDER /tmp For the example above, we will move the conflicting_plugin folder:sudo mv conflicting_plugin /tmp
  • Check if the application works again. Try it every time you move one plugin out of the stack.

Are You Trying To Migrate Your WordPress Instances To A WordPress Multisite?

If you have several WordPress installations and want to merge them in a WordPress Multisite installation, we do not recommend you modify wp-config.php to enable WordPress’ multiple blog feature. Instead, we recommend that you spin up a Bitnami WordPress Multisite instance and follow the steps in this guide.

Are You Having Problems Setting The Domain Name?

If you want to configure a domain name in WordPress, you may see that the URL section is greyed out.

URL Greyed out in WordPress settings

In order to set a domain name, follow this guide.

Did You Modify Any WordPress Configuration File?

If you get HTTP 500 errors when acces sing your application, check if you have performed any modifications in /opt/bitnami/apps/wordpress/htdocs/wp-config.php. Small errors in this configuration file render the application unusable. If you have modified the file:

  • Try finding any syntax errors in the file.
  • If you do not find anything suspicious, launch a fresh WordPress instance and compare the contents of the wp-config.php file in the new instance.
  • Check that the permissions and ownership are correct (find more details in this section).

Did You Modify Any Apache Configuration File?

If your WordPress application becomes unusable or is having issues loading certain content, check if you have changed any of the following configuration files:

  • /opt/bitnami/apache2/conf/httpd.conf
  • /opt/bitnami/apache2/conf/bitnami/bitnami.conf
  • /opt/bitnami/apps/wordpress/conf/httpd-app.conf
  • /opt/bitnami/apps/wordpress/conf/htaccess.conf
  • /opt/bitnami/apps/wordpress/conf/httpd-prefix.conf
  • /opt/bitnami/apps/wordpress/conf/httpd-vhosts.conf

An error modifying these files may break the application configuration. In this case, restore the Apache original configuration. You can do this by launching a fresh WordPress instance and comparing the contents of each file.

Can’t You Remove The Bitnami Banner?

If you are unable to remove the Bitnami banner (in the bottom right corner), make sure you have done the following:

  • You have followed the instructions detailed in this guide.
  • You have checked that the bnconfig command (in the guide above) did not show any error message.
  • You have executed the command with super-user privileges.

If this does not solve the issue, then open the files below with a text editor and remove their content:

  • /opt/bitnami/apps/bitnami/banner/conf/banner.conf
  • /opt/bitnami/apps/bitnami/banner/conf/banner-substitutions.conf

Restart Apache:

sudo /opt/bitnami/ctlscript.sh restart apache

Is Your Installation Slow?

Check that you are not getting suspicious access attempts in your server by following these steps:

  • Get the list of top 10 IP addresses that access your site:tail -n 10000 /opt/bitnami/apache2/logs/access_log | awk '{print $1}'| sort | uniq -c | sort -nr | head -n 10
  • Execute the following command once per IP address in the list. This will allow you to check the activity of each one of them (replace the IP_ADDRESS placeholder with the IP address):cat access_log | grep IP_ADDRESS
  • If the IP address is not your internal or external IP and its behavior is suspicious, such as accessing only one page or only trying to login, it is probably a bot.If that’s the case, block the address.

Are You Having Problems With Memcached?

The Bitnami WordPress stack does not include Memcached, so you need to check the following:

  • You installed Memcached using your operating system package manager:
    • Debian:sudo apt-get install memcached
    • CentOS:yum install memcached
  • You enabled the libmemcached module following this guide (NOTE: the steps mentioning ctl.sh do not apply).

Are You Having Issues Enabling Varnish?

By default, Varnish is disabled in Bitnami WordPress. If you have issues enabling Varnish, check the following:

  • Check that you followed this guide to enable Varnish.
  • Check the Varnish version in your stack. Depending on the version, you will need to use wordpress.vcl or wordpressv4.vcl.
  • Check that you have opened port 81 in your firewall to ensure that Varnish works correctly.
  • Check that you disabled PageSpeed Apache module.

The following resources may be of interest to you: