How WordPress Stores Content and Why It’s Important To Know


Read the full episode transcript below:

00:28 David Blackmon: Welcome to another episode of WP The Podcast, my name is David Blackmon.

00:35 Tim Strifler: And i’m Tim Strifler

00:38  David Blackmon: Today in episode 742 we’re going to talk about, how WordPress stores content, and why it’s important to know. You don’t have to be a know everything programmatically to be a WordPress business owner such as me. But having a good high level understanding of what’s going on matters, and Tim’s going to tell you why. 

01:05 Tim Strifler: Yeah absolutely. So basically WordPress has there’s two different sides. To a WordPress site in terms of like the the server, there’s the file system and there’s the database. The file system is where your WordPress itself. The WordPress files are stored it’s where your theme is stored or multiple themes if you have multiple themes on your site, which i feel like we all have several versions of the default themes that just pile up after the big updates that come out, and then the theme you’re actually using, and then your plugins are stored there, and as well as your media library. So most of the files in your file system don’t change with the exception of the media library. When you upload new images and stuff then your media folder will uh change and get bigger and stuff. But like your WordPress theme um like once your site is built even if you’re changing settings and stuff like that that doesn’t get stored there. Um if you have a child theme and you’re making adding custom css and adding custom php files and adding snippets to your functions.php then obviously that’s going to change. For the most part like you’re not going in into your file system and editing the WordPress core files, that’s a big no no. That’s how you break stuff. But when you’re on your site within the WordPress dashboard and you’re changing WordPress settings and you’re adding content, you’re adding blog posts, you’re adding pages, you’re changing settings in your theme and using your page builder to create content. All of that is stored in the WordPress database. And you might be wondering “okay what the heck is a database?” Well essentially a database is sort of like in the most simple terms possible, it’s kind of like an excel spreadsheet where you have rows and you have tables, and you have columns and stuff like that. And it’s storing data in different places, and it’s referencing data in different places and stuff. And so like for example WordPress has the WP options table and in the WP options table it has all of the settings for WordPress. And so it’s all your default settings, but then also if the theme adds stuff it can save stuff in WP options. And so different plugins and different themes will hook into different default WordPress tables to save stuff, save settings and save content. And then also some plugins will create their own database tables as well. And so the bigger your site the bigger your database is the more posts you have the more pages you have the bigger that those database tables will be. And so, if you’ve ever uh looked at um basically the format of the database is in WordPress is mysql. Mysql is a kind of a database language. And so you can um you can make edits to your database manually by going in and like clicking into the different uh tables and cells, and make changes that way. Or you can actually do what are called mysql is it database queries. Um anyways where you’re basically programmatically making changes to your database and it’ll go and do everything all at once based on what what you tell it to do. And then um I forgot, what i was going to say next, but yeah basically that’s how WordPress stores content. It stores it in the database. Oh i was going to say, if you’ve ever gone into phpmyadmin that’s the most popular tool to edit your database. So most hosting accounts you’re going to be able to edit and view your database via the php my admin software, and it can be kind of a scary thing. But I encourage, if you’re someone who’s building websites with wordpress and you want to learn how it all kind of comes together, go inside phpmyadmin click around look at the different stuff. Be careful not to make any changes and save anything if you don’t know what you’re doing, because you can break your site. So and on that topic it’s probably a good idea for you to make a backup before you start mucking around in the database, but um it’s one of those things that uh it’s a good thing to get familiar with, and just kind of look through and see “okay here’s a post that i have here’s what it looks like on the front end of my website, here’s how it looks in the WordPress dashboard, how does that post look in the database, how is that saved”, and it’s really a helpful thing to see how WordPress kind of pulls it all together. Because it’s not a static html site it’s using a database and every time you land on a WordPress page, it’s going to the database to fetch that content, caching aside and it does what’s called the WordPress loop. To go and check the database and get the most recent version of the post. And then it builds the page dynamically. And so anyways, that’s a very very technical way to talk about a website, but that’s how WordPress works and how WordPress stores content. And it’s important to know if you’re building it so you know kind of the anatomy of a website, and that way the more you know the more you can even if you’re not going to go in, and you know make database um changes. You at least know how it’s being saved so.

06:42 David Blackmon: All right Tim, thanks. I thought this was supposed to be a quick episode bro. Hey it’s quicker than the last few that we’ve done, quicker than the last few years. Right thanks for doing that. Tomorrow we’ve got another great topic, the basics of on-page seo. Until tomorrow we’ll see you then.

07:03 Tim Strifler: Take care, bye.

Did you Enjoy this Episode?

  • Will you consider sharing it online? Just click one of the share buttons below!
  • Will you leave us a review? 🙂
  • Have a question, or a topic request? Let us know in the comments below!

Want to Connect with David & Tim?

Submit a Comment

Your email address will not be published.

Where To Find Us

Listen to WP The Podcast on your favorite platform: