18 January 2012 ~ 19 Comments

Installing WordPress at Nearly Free Speech

Yesterday I went over the cheapest WordPress hosting options and came to the conclusion that Nearly Free Speech is the clear winner if you’re willing to do some technical stuff yourself. If you’re not willing to do some technical stuff and potentially deal with some technical issues, then HostGator is probably your best bet.

So what is it about Nearly Free Speech that you’ll have problems with? First of all, the online interface for managing accounts is arguably less intuitive for a lot of people. You will have to look at carefully before you fully understand it.

Second, you will need to setup the MySQL database process and create both the database, the user and give the user privileges to the database. There is no “1 click install” at NFS, so you will also be uploading WordPress on your own meaning you will need to use an FTP client.

Third, you’re going to need to change the permissions and group of the files in the wordpress folder, otherwise WordPress will not work the way you want it to. This will require you to use an SSH client like Putty.

Setting up your host and account

The first steps are easy. Visit Nearly Free Speech’s Signup page and follow the steps to get your site hosted. This will include setting up or directing an existing domain to a site and attaching a bandwidth account to it. This will cost about $10 unless you already have a domain then it will be free.

Setting up MySQL

The next thing you need to do is setup a MySQL process. To do this: select the MySQL tab on the top and click ‘Create New MySQL Process’ on the right. You will need to assign it to a funded account which you should have created in the previous step. It will take a few minutes to create your database…

Once it’s setup, you can connect to it by returning to the MySQL tab and selecting ‘Open phpMyAdmin’ from the right, or by clicking here. This is going to allow you to interface with your MySQL process so that you can create a database and create a user with sufficient privileged to use that database. This will be your WordPress database.

Enter your database name that you just selected for Server. Enter your NFS username and your NFS password to get in:

Nearly Free Speech phpMyAdmin

Once you’re logged in select ‘Privileges’ from the top and then click ‘Add a new User’ half way down the page:

phpMyAdmin Create User

In the popup that comes up, enter a username (I use “wordpress”) and then enter a password. For the password, make it something very unique. You should write it down but you’ll only have to type it once. Do not use an existing personal password. You can use the ‘generate password’ tool below or just slam on the keyboard. Finally, select ‘Create database with same name and grant all privileges.’

Create User

Once you click ‘Create User’ you’re all set. You now have a WordPress user in MySQL with full access to a database. You’ll use this information next when you configure WordPress.

Uploading WordPress

The next step is to upload WordPress to your new host by using an FTP client. If you have done this sort of thing before all you have to do is download WordPress from here (http://wordpress.org/download/) and upload the contents of the directory into your public folder. Otherwise, here is a step by step tutorial to do this:

First thing is first, download WordPress from http://wordpress.org/download/. You will get a compressed file with a folder called wordpress in it.

Next, you will need an FTP client. You can download FileZilla here (http://filezilla-project.org/). Install it. Open it up, go to File -> Site Manager and create a new site:

FileZilla

Make sure you select “SFTP” from the drop down and enter your username not mine. You can find your username under the sites tab at nearlyfreespeech.net.

Once you’re connected, you’ll see the folder on your server on the right side of the FileZilla interface. Next you need to drag the WordPress folder contents into the public directory. Hopefully thank makes sense because it’s hard to visualize with a screen shot. The point is that you upload all those files into your public folder so that when you visit http://www.yourdomain.com/ you see the wordpress site.

Upload

If you have any problems with that please comment below and I’ll help you as soon as I see it and then I can improve the tutorial for everyone else.

To confirm that WordPress is uploaded properly, visit your website and you should see a WordPress screen with this message: “There doesn’t seem to be a wp-config.php file. I need this before we can get started.” Don’t follow the instructions yet, instead continue to the next section to fix file permissions.

Fixing file permissions so WordPress works

WordPress requires certain access to your server’s directory and file structures. When you upload media it will need to be able to create files and when you do automatic updates and plugin installations it will need to be able to over right files and create directories. You can fix this problem as soon as WordPress is uploaded.

If you’re interested in the technical details of this, visit this blog for the original source of the following information. Otherwise, just follow these steps:

Download Putty from (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html). Open it up and connect to Nearly Free Speech’s SSH server using these settings:

Putty Settings

Now you’ll see a terminal screen asking you for your login. Look up your login and password under your site tab at NFS. It’s probably something like username_username. Then type your password and login. Once you’re logged in you’ll see some scary looking white text on black. Keep in mind that I’m not an expert and you may inadvertently break something as a result of following these instructions, so use this tutorial at your own risk. Also keep in mind that you can look up all of these commands if you want to understand exactly what they do, there are no secrets here. If you did that, you’d learn a ton!

So the first thing you should do is type:

ls -al

Which will show you all the files in your current directory along with their associated permissions and such. You should see, from top down, ., .., index.php, license.txt, etc. You should see a bunch of wp-activate.php, wp-admin, etc. These are the WordPress files you just uploaded. If you don’t see these return to the previous step and upload WordPress properly.

From left to right you’ll see permissions such as: -rw-rw-r– and then some long numbers lke 195392, which is your user ID at NFS. We’re going to change the group of all these files so that the web server can create and modify files. This was originally recommend here.

We’re also going to create a .htaccess file, which will let WordPress use permalinks (nice looking URLs). So let’s get started!

Create .htaccess file:

touch .htaccess

Note: Nearly Free Speech does not recommend that you change permissions as I explain below. “[this] can cause people’s blogs to get irreparably trampled by hackers whenever WordPress (or any one of its themes or plugins) has a security issue. (And particularly when it comes to themes and plugins, that happens a lot.).

Change the group of all files to web:

chgrp -R web *

Change the group of the current directory to web (only if WordPress isn’t installed yet)

chgrp -R web .

That’s it! As long as those commands didn’t report any errors you should be able to configure WordPress now.

Configure and Setup WordPress

To configure WordPress visit http://www.yourdomain.com and follow the wizard which will request your username, database name and password. In the ‘database host’ make sure you put the name of your database, for example: testtest.db. Run the setup and you’re all set!

Automatic Updates

I have one small tip left to share with you. If you want to be able to install and update themes and plugins easily from inside WordPress you need to set the FS_METHOD to direct in the wp-config.php file. You can do that by appending:

define('FS_METHOD','direct');

to the end of your wp-config.php. Otherwise, if you still have putty open you can execute this command:

echo "define('FS_METHOD','direct');" >> wp-config.php

Conclusion

Now you’re WordPress installation should work like a charm. Did I miss something? If I did please let me know in the comments.

19 Responses to “Installing WordPress at Nearly Free Speech”

  1. Saint 16 February 2012 at 6:48 pm Permalink

    Great post! Thank you so much. You got me up and running with no problems at all.

  2. skiddy 7 March 2012 at 2:12 am Permalink

    How could you work around this if unable to download Putty? Is it available for Mac? Trying to help out my sister with a wordpress website and unable to get the permissions correct to edit wordpress files…

    thanks!

    • Jamo 7 March 2012 at 10:51 am Permalink

      Hey Skiddy,

      On a Mac you can use Terminal and use the command:
      ssh ssh.phx.nearlyfreespeech.net

      Hit enter and it’ll ask you for your username and password. You can pickup with the first command after the screenshot of Putty. Good luck!

      • Erik 18 March 2012 at 4:38 pm Permalink

        Hi, thanks for the tutorial and the tip for Mac users, however I have a problem that is preventing me from going further: after I type the ssh ssh.phx.nearlyfreespeech.net it prompts me for the password but will not let me type it in. I have looked it up online and was told to enter in my password as if it was working and hit enter where it returns with permission denied. I am using the generic Terminal application for Mac OSX 10.6 — please help!

        • Jamo 18 March 2012 at 4:48 pm Permalink

          Erik, the info you found online is correct. When you type your password it doesn’t repeat it back to you for security reasons.

          If you type your login hit ENTER password hit ENTER without anything in between then it should authenticate you. If it doesn’t, the problem is beyond my ability to troubleshoot. You could contact NFS to ensure that you’re typing the right password. You could check to see if your CAPS LOCK is on and other silly stuff like that. You could also look for a Mac app that will let you specify the username and password before the connection so that you can rule that out. The last idea I have is that you COPY the password from a textedit file and PASTE it into terminal (I think you do this with right click).

          Chances are you’re making a silly mistake that you will figure out if you take a break, walk away and come back later. Good luck

          • Erik 18 March 2012 at 5:11 pm Permalink

            Thank you for your help — It is still not working but I am noticing something I think might be a problem: after I type the ssh ssh.phx.nearlyfreespeech.net it accepts and shows erikmabrysims@ssh.phx.nearlyfreespeech.net which is NOT my account on NFS; I guess my question is when do I enter my username for NFS instead of it grabbing my Mac account?

          • Erik 18 March 2012 at 5:41 pm Permalink

            I have figured out how to change the username, however, it still does not take my password. Thanks for all the help regardless, I will continue to try and figure this out from my end and consult NFS. Thanks again.

  3. Jamo 18 March 2012 at 8:58 pm Permalink

    The command to specify the username in SSH on a Mac is:

    ssh username@ssh.phx.nearlyfreespeech.net

  4. marshall 11 July 2012 at 11:32 pm Permalink

    I’m trying to create a new wordpress blog using nearly free speech.
    I used ssh username@ssh.phx.nearlyfreespeech.net

    I uploaded wordpress and now I have the error ‘There doesn’t seem to
    be a wp-config.php file’ when I go to my website. I understand that I
    only uploaded the sample wp-config.php file. I have renamed the sample
    file to wp-config.php and edited the things I needed to in the file on
    my desktop but unsure how to get that file uploaded. Any help would be
    appreciated. I’m very new to this but would love to learn all I can.

  5. marshall 12 July 2012 at 2:52 am Permalink

    I figured it out. Thanks!

  6. Cristhina 18 September 2012 at 10:27 am Permalink

    Hi Erik and Jamo,

    I am having the same problem when I enter my password I get the message “permission denied, pleas try again”. Did you find a way to work it out?

    • Jamo 18 September 2012 at 1:55 pm Permalink

      Sorry Cristhina, this sounds like something you should contact NFS with directly. Their customer service is fantastic despite the low cost of their other services.

  7. Nidhi 5 December 2012 at 1:16 am Permalink

    This worked. I kind of can’t believe it. Thanks!

  8. Q 9 March 2013 at 6:40 am Permalink

    After the last step, I get this fatal error when typing my site address into the URL bar:

    define(‘FS_METHOD’,’direct’);
    Fatal error: Call to undefined function wp() in /f5/sitename/public/wp-blog-header.php on line 14

  9. Amy 23 June 2013 at 8:03 pm Permalink

    Thank you SO MUCH. This issue has been plaguing me!

  10. Jennifer 24 January 2014 at 1:19 pm Permalink

    This is the best and clearest tutorial I’ve ever seen. I’m just getting started and it was a lifesaver. Thank you, thank you!

  11. Michael 15 June 2015 at 12:40 pm Permalink

    Thank you for the tutorial. You helped me set up my new web site. I couldn’t have done it without you.

  12. Reggie 7 November 2016 at 11:53 pm Permalink

    This was extremely helpful and very straight forward! thanks for the help!


Leave a Reply