With only $10 For a Domain Name, You Can Install WordPress on Free OpenShift with Domain Name For Running Personal Blog or a Specific Purpose Website. Cost is Zero for Hosting. We can use 3 Gears – one for web server, one for memcache or syncing with web server and another for database – scalable setup, each of 1 GB. If you use Rackspace Cloud Files as CDN, monthly cost will be only $1.00. It is far better than your shared hosting options.
Install WordPress on Free OpenShift : The Domain Name Part
You will use a dot com or whatever domain name you want and use the www
subdomain of the domain to install WordPress. People does the basic mistake – they first install the WordPress on OpenShift and then point the DNS. You need these things all together :
- An OpenShift Account (Free)
- A CloudFlare Account (Free too)
- A domain Name
- Free IP from wwwizer.com
You have no IP address, this guide not without reason is named Install WordPress on Free OpenShift with Domain Name. When you create the first application, you actually get this kind of url – https://shell-abhishekghosh.rhcloud.com. How to use that is written on this guide.
---
Yes, you can change the URLs later, but the sequence is important. If you first create a plain PHP App, you will actually get the subdomain name. Later you can install WordPress after pointing the CNAME towards it.
Now you need an IP address. We wrote about naked domain pointing. What you will do is that, you will use this free service – http://wwwizer.com/naked-domain-redirect
, their IP is 174.129.25.170
. No sign up. Free. On CloudFlare, if your domain name is example.com
and app domain is shell-abhishekghosh.rhcloud.com
, then you will setup in this way on CloudFlare :
1 2 | A Record example.com 174.129.25.170 (Some Low TTL) www CNAME shell-abhishekghosh.rhcloud.com (Some Low TTL) |
Add the CloudFlare’s name-servers at your domain register’s account. Then on CloudFlare’s Page Rules, add 301 redirect to example.com
towards www.example.com
with redirect match. Allow some time, things will start working.
Install WordPress on Free OpenShift with Domain Name
Now, from OpenShift’s account; first re-create the installation as WordPress with scalable option – MySQL database will be on different server. You can have PHPMyAdmin. No command line work. You can make it more scalable later. What we said is easy, official method.
As there is by no means you are installing the WordPress; it is readymade; you need to do some tricks. First, login to WordPress and go to : Settings > General and change the Site Address (URL)
to your domain name (http://www.example.com
). Also change the WordPress Address (URL)
in the same way.
Now, keep that webpage open. Go to OpenShift dashboard and select your app then click the “Change” button next to the domain name and update the OpenShift domain name (shell-abhishekghosh.rhcloud.com
for us) to your own domain (http://www.example.com
in example). Then save it.
Now, your WordPress is located at http://www.example.com
. There is a Plugin named Search and Replace. Install it from WordPress Plugin’s page and search for the OpenShift domain name (shell-abhishekghosh.rhcloud.com
for us) and change anything to your own domain (http://www.example.com
in example).
OpenShift now has recently added support to allow the applications to be hosted at own domain names rather than as a subdomain of rhcloud.com. You need to install OpenShift CLI tool. You can actually run this kind of command after changing the right values :
1 | rhc-ctl-app -c add-alias --alias www.example.com -a shell |
shell
is the app name of shell-abhishekghosh.rhcloud.com
, change it.
Now, git clone the App, and run :
1 | cd $app_dir |
We need to do some work, first cat this one :
1 | cat .openshift/action_hooks/build | grep mkdir $OPENSHIFT_DATA_DIR/uploads |
It should return nothing. If returns nothing then edit this file – .openshift/action_hooks/build
to add :
1 2 3 | if [ ! -d $OPENSHIFT_DATA_DIR/uploads ]; then mkdir $OPENSHIFT_DATA_DIR/uploads fi |
Now we need to symlink the wp-content :
1 | ln -sf $OPENSHIFT_DATA_DIR/uploads $OPENSHIFT_REPO_DIR/php/wp-content/ |
git push it. There are plugins to edit .htaccess
files. Install some such via WordPress interface and activate pretty permalink.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | Options All -Indexes <files .htaccess> order allow,deny deny from all </files> <files wp-config.php> order allow,deny deny from all </files> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] |
Add the things which are not present. This is the complete setup. Obviously, there will minute glitches but it is far superior than anything at that budget. Heroic is great but Heroku can be difficult to many users.
Tagged With political cartoon