nativeInstallerwordpress

Configure the WordPress domain name

Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and MacOS) or by clicking the shortcut in the Start Menu under “Start -> Bitnami APPNAME Stack -> Application console” (Windows). On OS X VMs, the installation directory is /opt/bitnami and OS X VM users can click the “Open Terminal” button to run commands. Learn more about the Bitnami stack environment and about OS X VMs.

NOTE: We are in the process of modifying the file structure and configuration for many Bitnami stacks. On account of these changes, the file paths stated in this guide may change depending on whether your Bitnami stack uses native Linux system packages (Approach A), or if it is a self-contained installation (Approach B). To identify your Bitnami installation type and what approach to follow, run the command below:

 $ test ! -f "installdir/common/bin/openssl" && echo "Approach A: Using system packages." || echo "Approach B: Self-contained installation."

The output of the command indicates which approach (A or B) is used by the installation, and will allow you to identify the paths, configuration and commands to use in this guide. Refer to the FAQ for more information on these changes.

WordPress at a sub-path of the domain root URL

If you are using WordPress v3.3.1-5 or higher and your WordPress application is accessible using a sub-path of the domain root URL, such as http://localhost/wordpress, specify your domain name and URL sub-path in the installdir/apps/wordpress/htdocs/wp-config.php file. Edit and replace the following lines as shown, remembering to replace the DOMAIN placeholder with the actual domain name you wish to use.:

define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/wordpress');
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/wordpress');

with

define('WP_SITEURL', 'http://DOMAIN/wordpress');
define('WP_HOME', 'http://DOMAIN/wordpress');

NOTE: Your domain name should be correctly propagated for this to work. You can verify the new DNS record by using the Global DNS Propagation Checker and entering your domain name into the search field.

WordPress at the domain root URL

If you are using WordPress v3.3.1-5 or higher, only specify your domain name in the installdir/apps/wordpress/htdocs/wp-config.php file. Edit and replace the following lines as shown, remembering to replace the DOMAIN placeholder with the actual domain name you wish to use:

define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/');
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/');

with

define('WP_SITEURL', 'http://DOMAIN/');
define('WP_HOME', 'http://DOMAIN/');

NOTE: Your domain name should be correctly propagated for this to work. You can verify the new DNS record by using the Global DNS Propagation Checker and entering your domain name into the search field.

To use WordPress with multiple domains, use the Bitnami WordPress Multisite Stack instead.

Last modification May 5, 2021