Share the Knowledge
RSS icon Home icon
  • Migrating WordPress from a shared hosting environment to a virtual private server

    Posted on November 9th, 2011 webmaster 3 comments         Print Print

    I was migrating this WordPress blog early this morning from Bluehost to a dedicated Rackspace Cloud Server that I’m already using for a web application I’m writing.  It was almost painless! Just ran into a few minor post-migration issues.

    The reason I’m migrating is mainly because I want more control, like being able to use my own self-signed SSL certificate without paying extra, for example.  I figured since I’m getting very low traffic it really wouldn’t cost me anything extra to host it on Rackspace.

    For example, according to Bluehost, my monthly bandwidth transfer is roughly 2.3GB.  I’m not sure if that’s for both inbound and outbound.  Either way, Rackspace only charges 18 cents/GB for outbound bandwidth (inbound is free).  So even if I’m using 3GB a month, it’s only an extra 54 cents to my monthly cost.  Rackspace’s connection is also way faster.

    The migration steps are pretty straighforward, basically:

    1. Install PHP, MySQL, Apache.
    2. Install WordPress.
    3. Restore the database.
    4. Copy over your themes, uploads, plugins, and other directories that a plugin might be using (in my case I had an extra “gallery” directory for the NextGEN Gallery plugin that I’m using to store my pictures).
    5. Restart Apache.

    Here are the issues I ran into after migration and their solutions:

    Read the rest of this entry »

  • How to change the hostname of your Ubuntu server

    Posted on November 9th, 2011 webmaster No comments         Print Print

    This post is really more of a note to myself as I’m sure I’ll be doing this again.  But hopefully someone else will stumble upon this and find it useful :) .

    I have a VPS hosted on Rackspace running Ubuntu 10.04 LTS server edition.  I wanted to change the hostname as I originally named it the name of the application I was working on, but I’m now planning on using it for multiple things.  I wanted the name to be more generic.

    Step 1. Type in the following command.

     sudo hostname newhostname 

    Step 2. Edit the /etc/hostname file and replace the text there with the new hostname and save it.

     sudo vi /etc/hostname 

    Step 3. Edit the /etc/hosts file and replace the old hostname references to the new hostname, then save it.

     sudo vi /etc/hosts 

    Step 4. Logout and log back in

    It will now show user@newhostname in the command prompt, typing hostname will now show the new hostname, and pinging the new hostname will resolve to something.

    Source: http://linuxservertutorials.blogspot.com/2009/02/how-to-change-hostname-in-ubuntu-server.html

  • How to allow remote connections to your PostgreSQL 9.0 database server on Ubuntu 10.04 LTS

    Posted on September 8th, 2011 webmaster No comments         Print Print

    Change directory to /etc/postgresql/9.0/main and modify the following configs (I know you’re sick of hearing this, but I recommend you back up your original configs before making any changes):

    postgresql.conf

    In “Connections and Authentication” section:

    From

    
    #listen_addresses = 'localhost'
    #password_encryption = on
    

    To

    
    listen_addresses = '*'
    password_encryption = on
    

    pg_hba.conf

    From

    host    all    all    127.0.0.1/32    md5
    host    all    all    ::1/128    md5
    

    To

    host    all    all    0.0.0.0/0   md5
    host    all    all    ::0/0    md5
    

    Restart the ssh daemon: /etc/init.d/ssh restart