vmwarewordpress

Debug WordPress errors

I cannot access my WordPress application

First, check that the URL is correct and the servers are running. If the server has recently restarted, the domain name and IP address could have changed. Check in the server administration panel that you are trying to access the correct URL.

To check if the servers are running, connect to the remote machines and run the following commands:

$ sudo /opt/bitnami/ctlscript.sh status
$ sudo /opt/bitnami/ctlscript.sh restart

If the servers are not running, check the web and database servers log files.

WordPress cannot load images or CSS

This usually happens when the server’s IP address changes. WordPress saves the IP address or the domain name in the database so if the IP address changes, it is necessary to update the database as well.

Issue in WordPress with CSS or images

Use the MySQL command-line client to change the exact field in the database:

$ sudo mysql -u root -p -e "USE bitnami_wordpress; UPDATE wp_options SET option_value='http://SERVER-IP:PORT/wordpress/' WHERE option_name='siteurl' OR option_name='home';"

WordPress tries to contact external sites when I log in

WordPress tries to contact external resources such as api.wordpress.com, wordpress.org, planet.wordpress.org or blogsearch.google.com. Most of these connections are performed to feed the widgets in the dashboard and are completely harmless. To prevent them, remove the widgets by selecting the “Screen Options” menu in the top right corner:

Screen Option

Then, deselect all the widgets:

Dashboard Widgets

Note some external connections may still be seen when WordPress or its plugins check for updates.

The plugin I installed is not working

Bitnami Wordpress is configured taking security in mind. It means that permissions for the configuration files are tied up. While Wordpress will work with most of plugins out there (and most popular ones), some plugins require further configuration or have issues with permissions (e.g. WP Super Cache).

If you are having permission issues while installing, activating or updating a plugin, log into your server and execute the following command:

$ sudo chmod g+w /opt/bitnami/apps/wordpress/htdocs/wp-config.php

Please retrieve the previous permissions configuration after activating the plugin.

$ sudo chmod g-w /opt/bitnami/apps/wordpress/htdocs/wp-config.php

Since Bitnami WordPress Stack 4.5-1, we ship WordPress with the latest version of PHP7. WordPress Core already supports PHP7 but some plugins may not support it yet. If you experience any issue with plugins related to this, check that the plugin you are installing already supports PHP7 or needs to be updated.

We also provide the latest version of WordPress, bundled with the latest version of PHP 5.6 that will avoid possible compatibility issues with plugins not prepared for PHP7. This version should be considered as legacy, WordPress recommends to move to PHP7.

WordPress enters into Maintenance mode after upgrading or activating a plugin

As mentioned before, Bitnami Wordpress is configured taking security in mind. It means that permissions for directories and files are strongly tied up. In the unlikely case that WordPress enters into Maintenance mode after upgrading or activating a plugin, you can try to disable all the plugins in the MySQL database named bitnami_wordpress by connecting to MySQL and running the SQL sentence below:

UPDATE wp_options SET option_value = 'a:0:{}' WHERE option_name = 'active_plugins';

You can connect to the bitnami_wordpress database using the user bn_wordpress and the random password located in the /opt/bitnami/apps/wordpress/htdocs/wp-config.php file running the command below:

$ mysql -u bn_wordpress -p bitnami_wordpress;

After that, restart all the services for changes to take effect running the command below and try to connect to your website again:

$ sudo /opt/bitnami/ctlscript.sh restart

If you want to activate the plugin that caused you the issue, you need to upgrade it first and then connect to your server via SSH and execute:

$ sudo chown -R bitnami:daemon /opt/bitnami/apps/wordpress/htdocs/wp-content
$ sudo chmod -R g+w /opt/bitnami/apps/wordpress/htdocs/wp-content

After that, you should be able to activate the plugin from the WordPress Admin Panel.