Tutorial: Add a Background to your WordPress Theme
By
Note: This is one in a series of tutorials on customizing your WordPress theme geared to the beginning or intermediate WordPress user.
One of the easiest ways to customize a basic WordPress Theme is by changing the background. Using this step-by-step guide, even novice bloggers can make small changes that will have a big impact!
When you first install WordPress the default template is loaded and it looks something like this:

In order to make changes to it, you need to first log in to your WordPress dashboard, choose Presentation and then Theme Editor. On the right hand side you will see a list of files you can edit. Select style.css.

Scroll down to the part of the code labeled body. In that code block you will see a line that says background. This is the part of the code that tells the template what color and/or background image to display. If you just want to change the background color and do not want an image in the background, you can easily change it.
I deleted the piece of code starting with “url” and replaced the color code with one for a deep red – #990000 (see a complete list of color names and codes). Once you make your change, select Update File and go take a look at your results.

Let’s say you want to get a bit fancier and would prefer to use one of the many beautiful free backgrounds available on the web (check my list of 13 sites for Beautiful Patterns and Backgrounds first). In which case, you need to find the background you want to use and download it. Use an FTP program (Need help? See my FTP tutorial for details) to transfer the .gif or .jpg file into the theme’s image directory.

Once the file is there, go back into your WordPress dashboard, select Presentation, then Theme Editor and open up the style.css file again. Take a look at the background line of code again and change kubrickbgcolor.jpg to the name of the background image you want to use – in my case, distressed-in-blue.gif (from Din Pattern).

Select Update File and take a look at your handy work.

Each theme you use is going to coded a bit differently, but the majority of them should operate very similarly to this – especially the ones that are well-coded. Once you get comfortable working with the style sheet and its components, it is relatively easy to make basic customization changes.
If you are up for it and would like to learn more about the code for WordPress theme, there’s a good tutorial on creating your own WordPress theme.
I plan on adding more tutorials to this series in the near future with one on adding a graphical header, customizing your fonts and colors, as well as other basic WordPress techniques. If there is any particular topic you would like me to deal with sooner rather than later, let me know!












22 Comments
December 6th, 2007 at 3:21 pm
This is a great tutorial Char! The instructions were very easy to understand.
December 6th, 2007 at 9:27 pm
Thanks for this great tutorial. I had someone set up my first wordpress blog, but I’m working on one myself right now. This is a huge help. I’ll be checking back to see the rest of your tutorials.
December 7th, 2007 at 1:13 am
I’m learning a lot everyday…this is an awesome tutorial….
December 13th, 2007 at 9:14 am
Thanks for the tutorial. I have a question. It seems the background image is repeated, how can I stop it.
December 13th, 2007 at 9:17 am
Saikat – you need to add no-repeat, repeat-x or repeat-y after the image location to control whether or not the image repeats. Does this help?
December 13th, 2007 at 9:36 am
Thanks, that worked. But the problem is the image has a color shade. It blends from light colored pattern to darker. Now, if I put no-repeat or repeat-x, the bottom portion of the index page looks odd with no background. Any suggestions?
May 4th, 2008 at 10:30 pm
Hey! I like this site, but I”m confused on how to change a backgound! I don’t c where is says presentation?! WordPress just changed their format, so how do u do it now??
October 10th, 2008 at 11:35 am
amanda, in version 2.6 you want to go to “Design” then “Theme Editor” then click the “Stylesheet” link at the lower right. That should get you to the style.css and then scroll to the background tag to make your changes.
October 10th, 2008 at 7:32 pm
Garret – thanks for jumping in and answering that for Amanda! For some reason I had missed that question.
October 30th, 2008 at 12:22 pm
I just want to make sure I’m understanding correctly – are these changes that can be made without purchasing the CSS upgrade or do they assume you have already done that? I’d love to just change a few things like bkgd w/o paying for an upgrade…Thanks!
October 31st, 2008 at 12:03 pm
Tara – these instructions are for the self hosted wordpress.org sites. If you have purchased the CSS upgrade at WP.com it should work, too.
November 27th, 2008 at 7:11 am
Thanks for this tip, cheers.
December 5th, 2008 at 3:29 pm
Thanks for the tips, helpful for beginners like me
March 6th, 2009 at 7:26 pm
Hi Char…. I am not sure if I am doing this right or not. But I am pretty familiar with .css and html codes. I had changed my background image alittle and saved it as the same image name and uploaded it to the themes/power-dream/images folder. But for some reason it said it uploaded but the file was not updated.
So not sure what I am doing wrong…
Any help would be great….
thank you
Julie
May 2nd, 2009 at 7:03 pm
I can’t get this to work…can you see an error?
body{
font-family: verdana;
font-size: 95%;
line-height: 115%;
background-color: #FFFFFF;
background-image: url(‘images/wallpaper-stripes.jpg’);
background-repeat: repeat;
background-position: center top;
text-align: center;
July 13th, 2009 at 3:53 am
what about the page, itself ???
How do I get the page to change from white to pink, or yellow, or something ??
I’m talking about the inner page. and, come to think of it, what’s that called anyway?
August 12th, 2009 at 5:42 pm
Wow, didn’t think I could learn how to change the background in like 3 minutes! Thanks!
October 3rd, 2009 at 11:02 pm
Thank you so much for this tutorial, I was wondering how to do that for the longest!
October 9th, 2009 at 4:17 am
Thanks for that great tutorial. I was looking for a background of a picture of sky, sun, grass or other nature theme to put into my eco blog but could not find among the paterns. Is there a place I can find this?
December 27th, 2009 at 1:20 pm
Hi I did what you said to and I also previewed the changes but it says you need to purchace inorder to save the changes. is there a way around that?
December 27th, 2009 at 6:22 pm
Liz – these are instructions for WordPress.org. You are using the WordPress.com version which has more restrictions on it.
August 6th, 2010 at 5:29 am
I had a heck of a time locating the background setting in the script. I found 35 different places in the script where the word ‘background’ appeared. Eventually I found I didn’t have to edit the script after all! My theme came with a special theme editor where the options can be set.