How To

Install & Configure WordPress (Updated)

Attractive, easy to use, but non-trivial to install correctly, WordPress can be confounding. And, because of the complexity of installing WordPress, people turn to shared WordPress installations, which are cheap and ready-to-use. But, these are often poor-performing and, worst of all, inadequately secured — say no to FTP!

These instructions will walk you through the creation of a standalone WordPress server using Bitnami’s excellent WordPress installer. This should take less than 10 minutes and result in a WordPress server that is:

  • Secure – If only because this installation replaces FTP with SFTP it is more secure than virtually all the shared WordPress offerings. Here, we will also install phpMyAdmin securely. And, as with all Open Hosting servers, enabling our platform firewall is very easy.
  • Fast and easily scalable – Start small, and it might cost about $15/month. But, this same server can be scaled to accommodate thousands of simultaneous users by added RAM, CPU, and disk.
  • And, yours alone – The server is yours alone and you have root!

These instructions assume (1) you use an Open Hosting pre-install of Ubuntu 12.04 LTS and Bitnami’s WordPress installer v3.5.1; (2) all the commands are executed as toor; and, (3) you have a very basic understanding of how to use Nano. Windows users may want to install PuTTY. And, as a final note, please remember that Open Hosting is an unmanaged hosting service. This means we don’t support WordPress; we support the platform. Still, we invite your questions and suggestions about WordPress and our platform.

Good luck! And, let us know what you think of these instructions by emailing support.

Let’s get started…

  • Create an Open Hosting pre-install: After logging in to your account, create a pre-installed server from Ubuntu 12.04 LTS 10GB is a good minimum for disk size.
  • Add a static IP to your Open Hosting account and assign it to your server: In you account, click Add static IP, on your server icon click Dynamic IP, and select the static IP that you just added to your account. In this example, that means binding to the server called “WordPress Demo.”
  • Start the server: Click the green power button.
  • Connect via SSH: As is the case with all of our pre-installs, for SSH access use the toor user and

enter the VNC password


[VNC password]

  • Update Ubuntu using the package manager:

apt-get update

apt-get dist-upgrade

  • Say “Yes” and dont’ worry if this takes a few minutes.
  • Download the Bitnami WordPress installer:


  • Make it executable:

chmod 755

  • Run the Bitnami installer:


When asked “Please, choose a folder to install BitNami WordPress Stack,” be sure to select the default (“/opt/wordpress-3.5.1-1″) by pressing ENTER.

When asked “Please select the use of this Stack,” be sure to select the default (option #2 “Production settings”) by pressing ENTER.

When asked to “Launch BitNami WordPress Stack,” select default (“Yes”) by pressing ENTER.

  • Move the WordPress to webroot – Apache: By default Bitnami doesn’t install WordPress in the webroot; the default URL is: [hostname]/wordpress. To move the site to webroot, you’ll need to edit wordpress.conf. Open wordpress.conf for editing:

nano /opt/wordpress-3.5.1-1/apps/wordpress/conf/wordpress.conf

Add this line to the top of the file:

DocumentRoot "/opt/wordpress-3.5.1-1/apps/wordpress/htdocs"

Comment-out the following two lines by adding “#” at the start of each line:

# Alias /wordpress/ "/opt/wordpress-3.5.1-1/apps/wordpress/htdocs/"

# Alias /wordpress "/opt/wordpress-3.5.1-1/apps/wordpress/htdocs"

Looking a little deeper into the file, find the line that reads “AllowOverride None” and change it to “AllowOverride All”.

Then, find the line that begins “RewriteBase” and remove the “/wordpress” prefix.

Next, comment-out the bottom four lines that begin “RewriteRule….” by adding “#” at the start of each line.

When you’re done, it should read like:

DocumentRoot "/opt/wordpress-3.5.1-1/apps/wordpress/htdocs"

# Alias /wordpress/ "/opt/wordpress-3.5.1-1/apps/wordpress/htdocs/"

# Alias /wordpress "/opt/wordpress-3.5.1-1/apps/wordpress/htdocs"


< Directory "...">

AllowOverride All


RewriteBase /

# RewriteRule ^index\.php$ - [L]

# RewriteCond %{REQUEST_FILENAME} !-f

# RewriteCond %{REQUEST_FILENAME} !-d

# RewriteRule . /wordpress/index.php [L]


</ Directory>

Save the changes and exit.

  • Move the WordPress to webroot – WordPress:To complete the move, the WordPress configuration requires one change, And, while we’re here, we’ll make an unrelated but useful change. Open the file for for editing:

nano /opt/wordpress-3.5.1-1/apps/wordpress/htdocs/wp-config.php

Near the bottom of the file, find the two variable called “WP_SITEURL” and “WP_HOME” and remove the “/wordpress” prefix. They should now read:

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

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

To avoid using FTP, enable direct updates to WordPress by adding this comment and configuration value to the bottom of the file:

/** sets up direct method for WordPress, auto update without FTP **/


Save the changes and exit.

  • Optionally, to make SSL work, open httpd-ssl.conf for editing:

nano /opt/wordpress-3.5.1-1/apache2/conf/extra/httpd-ssl.conf

Find the section called “<VirtualHost _default_:443>” and change the “DocumentRoot” to:

DocumentRoot "/opt/wordpress-3.5.1-1/apps/wordpress/htdocs"

Save the changes and exit.

  • Restart Apache:

/opt/wordpress-3.5.1-1/ restart apache

  • Make htaccess writeable:
  • By default, htaccess is not writeable by WordPress. Life’s much easier when it is. But, as of 3.5.1., Bitnami is no longer installing an htaccess file, which means we first need to create one:

touch /opt/wordpress-3.5.1-1/apps/wordpress/htdocs/.htaccess

chmod 666 /opt/wordpress-3.5.1-1/apps/wordpress/htdocs/.htaccess

  • Update htaccess:
  • Next, we’ll have WordPress update htaccess. In your browser, login to WordPress using the credentials you supplied during installation:


Navigate to Settings, then Permalinks, and click Save Changes. (You’re not required to change any settings; clicking Save Changes is enough.)

  • Install Bitnami as a service:
  • By default, the Bitnami application stack is not installed as a service and won’t start on boot. First rename the Bitnami control script to something more specific and copy it to /etc/init.d:

cp /opt/wordpress-3.5.1-1/ /etc/init.d/bitnami-wordpress

Then, use rc-update.d to add the script to the desired runlevels. (Here, 80 for start and 30 for stop.)

update-rc.d -f bitnami-wordpress start 80 2 3 4 5 . stop 30 0 1 6 .

  • Connect to phpMyAdmin:
  • If you opted to install phpMyAdmin during the Bitnami setup, you’ll not be able to access it without changing the configuration or by SSH tunneling. We recommend tunneling. This will avoid making phpMyAdmin accessible over the Internet.From a local terminal, execute the following command:

ssh toor@[hostname-or-IP] -N -L 8080/localhost/80

[VNC password]

Next open a browser to:

To login, the username is root and the password is the same WordPress administrator password you supplied during the Bitnami installation.

Get In Touch At To Start Your Free Trial.