Understanding how WordPress stores content
Having read the list of files contained in a WordPress site, you may be feeling quite daunted! But the good news is that you don't need to think about the files I've listed here as WordPress does the thinking for you.
So, let's take a look at the contents of a WordPress site in more detail.
WordPress files
When you install WordPress, a number of files are uploaded to your server. The good news is that you don't need to do anything to these files; in fact, you shouldn't. If you edit these files (referred to as the core files), any changes you make will be lost when you install the next WordPress update.
Later in this chapter, you'll learn how to install WordPress. Once you've done that, you can ignore the core files. Phew!
Theme and plugin files and uploads
The next set of files is stored in the wp-content
directory, inside your WordPress installation. This directory will normally look similar to this:
Let's take a look at the file types:
themes
: When you create your site, you will need to install a theme, which is what will give your site its design and layout and possibly, some extra features too, depending on the theme. There are thousands of themes available for you to download and use on your site, and a lot of them are free. WordPress stores the files for your theme in thethemes
folder, with each theme having its own folder. You'll never need to open these files or edit them.plugins
: These are extra packages you install in your site to add more functionality. There are thousands of plugins available, and like themes, a lot of them are free. Later in this chapter, you'll learn how to install and configure plugins on your site. Again, the good news is that you don't have to worry about these files; WordPress will do the work for you.uploads
: This folder contains all of the images and other media that you upload to your site. When you first install WordPress you might not have this folder yet, as it's automatically created the first time you upload media to your site. You don't actually upload these directly to this folder; instead, you use the WordPress interface to upload them and then WordPress stores them in the correct place for you. It is another example of WordPress making your life easier! Later in this chapter, you'll learn how to upload an image and insert it in a page on your site.
Sometimes, your wp-content
directory will have some extra folders, for example, if a plugin adds one. Don't worry if that happens, just leave them alone!
Database
The final piece in the jigsaw is the database. This is where all of your content is stored—your posts, pages, and any settings you've made on your site.
The main benefit of using a database is that it keeps your content and your design separate. As your site grows, this makes your life much easier because you don't have to directly edit HTML files if you want to make changes to your site. The parts of each page that are the same across the site (for example, the header, footer, and sidebars) are kept separate from content, meaning if you want to change them you only have to do it once.
Everything you may need to do with your WordPress site can be done via the WordPress administration screens; you never need to touch the code. If you're not a techie, this will be a very good news!