Where are WordPress Pages & Posts Stored? How to Find Them?

WordPress contributes to the creation of a lot of websites. To be precise, WordPress powers 43% of the websites on the internet. This is an astonishing figure.

This popularity of WordPress is due to the following reasons:

  • You can build a website without even knowing how to code
  • Several features like adding these stunning modern homepage slider designs come out of the box
  • The open-source platform allows a lot of developers to build additional functionalities on it
  • Layouting a website is as easy as creating slides
  • Above all, it is a Content Management System (CMS) that comes for free

CMS is often used by website developers a lot. With this technology, the development of websites is very easy.

What is a Content Management System (CMS)?

A Content Management System is application software that allows users with different roles to add, update, read, produce, and store digital content.

Several CMSs are built on many platforms. Joomla, Drupal, Magento, and Prestashop, to name of few. Several others belong to both open-source and proprietary.

What is WordPress?

WordPress is one of the many CMSs out there that does a great job. It has a user interface that makes it so easy to handle and a lot of additional functionalities that you can extend using its themes and plugins.

While the themes extend the cosmetics of the website, the plugins extend functionalities from small ones to major applications.

WordPress technologically is built on PHP and MySQL. While HTML and CSS are added to the cosmetics of the creation.

How does WordPress work?

WordPress platform is divided into Root, Admin, Include, and Content.

  1. Include and Root contains the Core files.
  2. The admin folder contains the files required to run the admin panel
  3. The content folder contains the themes like Kadence, Astra, Blocksy, plugins like Essential Grid, WooCommerce, and media

Among the core files, only the one in the root folder by the name wp-config.php can be changed. Changing any other fire other than this will be at your own risk.

Using these files and a database (connect to the WordPress database by following this article), WordPress works as a dynamic application that is full of PHP and MySQL codes.

Where is the content stored in WordPress?

All the content that we write and add to the website, in the form of text, photos, videos, links, audio, and many more file formats are all stored in the database.

Of course, the media files like images, videos, audio, etc. are first uploaded to the “Media” folder in the “Content” folder. After they are uploaded, their path is saved in the database corresponding to different activities.

The immediate question that arises is:

What is a Database?

A database is an organized set of structured data typically used for easy access, management, creation, and updating. They are usually stored in rows and columns and are managed using queries.

If you are unable to understand anything from what we said earlier, you don’t need to worry. We will make you understand what exactly we mean in the previous section, going forward.

Where are WordPress pages and posts stored?

As told earlier, the content is stored in the database. We are not going to get into details of what a database is. For now going by our definition from the previous section, let us start to understand where WordPress Stores its pages and posts slowly using screenshots.

Since we know that the pages and posts are stored in the database, we will have to get access to the database where they are stored. There are many ways of getting this access. Let us first follow the most common way, via cPanel.

How to Login to cPanel?

The most common way of login into cPanel is via a browser that you like. We are using Google Chrome here.

Login page of cPanel
Login page of cPanel

To log in you need a URL. This URL cannot be accessed the same way throughout. It depends on the portal which we have purchased the hosting services from.

The most popular hosting providers are:

  1. BlueHost
  2. NameCheap
  3. HostGator
  4. Hostinger
  5. GoDaddy

We are using the service of NameCheap. It will be more or less the same procedure as the other providers. Try to understand the overall concept and you will be good to go.

So, let us now start to get into the database. The first step is to log in to the NameCheap account where we have purchased the hosting services.

Log in to NameCheap Dashboard
Log in to NameCheap Dashboard

Once you log in, select the hosting service that you have purchased and hover over the below icon.


You can see the following popup menu from where you can directly select “Go to cPanel”.

Select Go to cPanel
Select Go to cPanel

That’s it. You are now accessing the cPanel without even entering the credentials (the username and password).

An overview of the cPanel
An overview of the cPanel

How to access the cPanel Database?

Once you are in the cPanel, you need to access the database. To do that you need to make use of the search panel. Type “Php MyAdmin” to access the database.

To access the database, use the phpMyAdmin application
To access the database, use the phpMyAdmin application

phpMyAdmin is an application that allows you to access the database, tables, etc. in a graphical user interface (GUI).

This is what the phpMyAdmin looks like.

phpMyAdmin with Databases on the left and actions on the top
phpMyAdmin with Databases on the left and actions on the top

Select the right database that is a part of this website from the left sidebar. Every database will have several tables. Each table will have a different name.

Once you select a database, all the tables that the database contains will be displayed on the right side.

The list of tables in the database selected
The list of tables in the database selected

Every table will have a prefix for security purposes. While the installation, this can be selected. Some tables are default and standard. Some others are added when you install new plugins.

Which table in the database stores the WordPress Posts and Pages?

Now, you have to look for the table by the name “yourprefix_posts”. “yourprefix” is the prefix that you have selected during the time of installation.

Once you selected the table, you will be shown the data that the table contains. This is the table where all the posts and pages are stored. You should not get misled by the name of the table.

The table posts that store all the posts, pages, and other data
The table posts that store all the posts, pages, and other data

Even though the name of the table is xx_posts it contains data including the pages, global styles, posts, revisions, etc.

The field that differentiates posts from pages is post_type. From the above image, you can see the posts that are a part of this website.

Now, we got to know where the content of the posts is. We should now understand how the posts and pages are displayed.

Where to find WordPress Pages and Post Templates?

Like how the database is categorized as tables, the theme layouts are categorized as PHP files in WordPress.

To access this, you can either make use of the built-in editor available for WordPress or you can access the pages as files from the cPanel File Manager.

Let us do the first one first.

How to access the Page and Post Templates from WordPress?

Go to Appearance > Theme File Editor.

Theme file editor to edit theme files
Theme file editor to edit theme files

Now, you can go to the right sidebar and search from these two pages. You will be shown the PHP code of these pages when you click on them, so you can customize them even if you know a little bit of PHP.

Where are WordPress pages in cPanel?

If you want to find the same PHP files from the cPanel, you can start from the login. This is what the cPanel looks like.

cPanel Dashboard where all the apps are displayed
cPanel Dashboard where all the apps are displayed

Search for File Manager using the search bar.

Searching for the file manager will result in the File Manager application
Searching for the file manager will result in the File Manager application

Where are my WordPress pages in File Manager?

Click on it and you will be taken to the folder where you have installed WordPress, where you can see the below three folders.

Your theme
Your theme

Open the wp-content > themes > your-theme, where you can find the two files using which you can customize the page and post layouts.

Customize the page and post layouts using these two files
Customize the page and post layouts using these two files

Similar Posts


Leave a Reply

Your email address will not be published. Required fields are marked *

five + eighteen =