A common and reasonable question: Where are WordPress pages stored? A lot of beginners in website building might be asking that question, and there are a lot of ways to answer it. In this article, you will be guided on where you can find WordPress page storage, and what are the different ways to use it.
Easier way to find WordPress Pages
There are two answers that will be discussed in this article, below is the summary for people who are in a hurry.
- WordPress Pages are stored by the CMS (Content-Management System). The easy way to find and modify them is by going to your WordPress site’s back-end, it is located on the left-side menu for Pages. There you’ll find your WordPress Pages.
- WordPress Pages, as well as Posts, are stored in the MySQL database that WordPress relies on. In the database, Pages and other WordPress custom posts are stored in the wp_post table of the MySQL database. You’ll typically access these using a tool like phpMyAdmin.
Where WordPress Stores Posts And Pages In The Database
To view or modify your data, you’ll need to use the phpMyadmin tool. To do this, you have to log in to cPanel (or your web host’s control panel) and locate the phpMyAdmin tool icon or button.
After you open the phpMyAdmin, you’ll have to select the name of your database which is located in the left sidebar:
If you installed WordPress and it comes with an auto-installer, look for the wp for WordPress and it might probably look something like wp_sitename. For security purposes, most of the autogenerated database’s names are composed of random numbers and letters.
After you select your database, you’ll see a list of database tables:
Click on the one titled wp_posts. You will see the list of content items on your WordPress site, from attachments to posts, pages, revisions, etc.
Each item contains a certain type of metadata in the table each column. For example, there are columns for the post’s title, content, excerpt, status, comment status, and more. If you’re looking for a specific type of content, for example, posts or pages, make sure to sort the table by the post_type column. You can also use the search bar to search for what you are looking for.
That’s how you can find where WordPress stores your posts and pages. From there, you can easily edit any contents or metadata of a given post or page as needed.
Where To Find Your Theme’s Page And Post Templates
WordPress stores your posts and pages’ content as well as metadata in the database, and those data are dynamically merged into your current theme’s PHP Template, you can find it in your file system.
You can use Filezilla (FTP Client) or your cPanel file manager to access your site files.
From your website’s directory, go to /wp-content/themes/your-theme/ to replace your-theme with your currently active theme.
Within this directory, you will see single.php which is your single post template, and page.php for your page template. You can edit the files in your directory to change the way WordPress Formats your content.
Be mindful that these files do not contain the content of your individual posts or pages, it will just format the web pages, query the database, and command WordPress for the content to be displayed.
In conclusion, wp_posts table of your database stored the content of your posts and pages and the path /wp-content/themes/your-theme/ stored your posts and pages templates.
Thank you for reading. ‘Til the next tutorial!