Blog Archives

Designing your own blog with wordpress.org & CSS, part 1

I decided I really would write up a guide to customizing your own wordpress.org blog, lol.  I’m going to write this guide geared toward someone who has never done CSS before.  I’ll explain how to set up a wordpress.org blog, install the CSS editor theme Toolbox, and start customizing it by editing the CSS file.

What you’ll need to do is download the blog files,  add a database for the blog to your domain host’s mysql databases, add user who can use the database, edit the config.php file in the blog folder with your database and user info, then upload the files into the appropriate folder in your domain.  Sounds complicated, but it’s pretty easy and I’ll walk you through it.

GETTING STARTED:

1. Alright, to start off, you need to head over to wordpress.org and download the blog files. I usually just download the zip to my desktop for easy access.  Extract the files.

*Note that wordpress.org is different than wordpress.com – wordpress.com will host your blog on their website, while wordpress.org gives you the files to upload onto your own hosted domain site.   Hosting your own site has several advantages, namely that you have absolute control over how your blog looks, access to hundreds of plug-ins, and the professionalism of having your own site with out .wordpress.com tacked on the end of the URL.

2. Read wordpress.org’s installation guide.  Installing it is really fantastically easy and the guide will tell you much of what I’m going to tell you.  You probably can do this with only the guide, but just in case I’ll tell you how I do it.

3. Now that you’ve downloaded and extracted the blog files, go to your hosting website and log into your dashboard (the area where you can manage your sites and all their info, databases, files, ect).  I use Hostgator personally (no real reason except it was the one my sister was using when I got into coding).   There should be a link/button somewhere around your dashboard that lets you create mysql databases.  This should take you to a page where you can create a new database and/or user.  In Hostgator this is very simple to do – you’ll find the database creator at the top of the page. Simply enter the name of the database you want to add (like, ‘blog’) and then click create.  Congratulations, you have a new database!

4. Now you need to make a user to use that database with your blog.  This is also quite simple, in Hostgator you’ll find the user creator form underneath the database creator, on the same page.  Just scroll down a bit.  Add the name of the new user (like ‘john’ and then enter a password for that user and click create.

*Note that your username for your domain will be added before the database name and user’s name automatically – at least it does in Hostgator, so read up on what your own host does. So if you’re using Hostgator and your username for logging into your domain dashboard is ‘happycoder’ then and you make a database called ‘blog’, it will automatically be named ‘happycoder_blog’.  Same thing with adding a user – add a user called ‘john’ and it will turn into ‘happycoder_john’.  This is important to remember when you’re filling out the wp-config.php file of the blog!

5.  Open up the blog folder you downloaded and find wp-config-sample.php and rename it to simply wp-config.php.  Open it up in your text editor and near the top you’ll find the following bit of code:

// ** MySQL settings - You can get this info from your web host ** // 

/** The name of the database for WordPress */
define('DB_NAME', ' '); 
/** MySQL database username */
define('DB_USER', ' '); 
/** MySQL database password */
define('DB_PASSWORD', ' ');

6.  In the DB_NAME brackets, enter the name of your database.  In the DB_USER brackets enter the name of your user, and finally in the DB_PASSWORD brackets enter the password you use to log into your dashboard.  So, using our example:

// ** MySQL settings - You can get this info from your web host ** // 

/** The name of the database for WordPress */
define('DB_NAME', 'happycoder_blog'); 
 /** MySQL database username */
define('DB_USER', 'happycoder_john'); 
 /** MySQL database password */
define('DB_PASSWORD', 'happycoderspassword');

7. Now that you have the wp-config.php file edited to your database and user, decide if you want your blog to appear as the home page of your site, or in in a separate area. 

-If you the blog to be the home page of your site and the main focus, you will upload the files from the blog folder directly into the root folder for your domain.  The blog will automatically show up as your home page when someone types your URL into an address bar (this is assuming that there are no other files already in your domain root, if there are you would need to remove any preexisting index.php as it will clash with the index.php of the blog). 

-If you want to use a static HTML page for your home page, (i.e, making a site that has articles and a home page, with a blog not the main focus) then you should rename the folder containing the wordpress blog files to ‘blog’, as you’ll upload the entire file into your root to keep the blog in it’s own separate area.

8. Open up whatever FTP program you use and connect to your domain.  Navigate to the root file of your domain and upload either the files from the wordpress folder (if the blog is going to be your home page) or the entire blog folder (if the blog will be in a different area of the site).

9: Open up a internet browser and type in the domain name of your site, adding wp-admin/install.php to the end of the domain and hit enter (if you uploaded the entire blog file, use blog/wp-admin/install.php).  You should find yourself being taken to installing options where you can fill out your username and password.  Once that’s done, you’ll be taken to the dashboard of your new blog, all set up and ready to customize!

*Note that if you get an error and are unable to get to the installation, check to make sure that everything has been uploaded properly and in the right place.  If it’s still not working make sure you have the right address typed into the bar, and if it STILL isn’t working, you may need to check with your host to see if they support wordpress.

10: From the dashboard, go to appearance > themes.  Select the ‘Install Themes’ tab and type ‘toolbox’ into the search bar.  When it pops up, click install and it will automatically be installed.  Now go back to ‘Manage Themes’ and you’ll see Toolbox is now added to your list of installed themes.  Select activate to make it your blog’s current theme.

Now you have successfully installed a wordpress blog on your domain and installed the theme we’ll be working with.  Next time we’ll get started actually editing the CSS!

Advertisements
%d bloggers like this: