Wordpress / Wordpress Tutorials

Where are WordPress posts and pages stored

Published 22 March 2021

Last updated on 5 April 2021

Have you ever wondered where WordPress stores your posts and pages? Additionally, have you ever needed to access these? WordPress stores all of your websites posts and pages data in it’s MySQL database. In this tutorial, I will explain how you can access where WordPress stores these posts and pages and how you can export them.

Understanding WordPress

Firstly, it is important to understand how WordPress and its database works. Whenever someone visits a specific page on your website, WordPress fetches the content directly from the SQL database and displays it on the frontend of your site using PHP. Therefore, WordPress stores all of your pages and posts in the database so that it can dynamically generate HTML pages for visitors to view.

Where are WordPress posts and pages stored?

As mentioned above, WordPress stores posts and pages written in PHP, not HTML (what your visitors see). All of the content of your posts and pages are stored in the wp_posts table of your database. To access this, you must login into your web hosting account.

Control panel login

Next, go to Cpanel> Databases> phpMyAdmin (this comes integrated with each cPanel). PhpMyAdmin is a free software tool written in PHP and handles administration of a MySQL database server. After opening phpMyAdmin, you can select the name of your database in the left sidebar.

How to access wordpress database through phpmyadmin

You will see a list of database tables, where you can select the one titled wp_posts. This table includes all post types (posts and pages). Therefore, there is not a separate table for your WordPress pages. The column post_type will specify whether the current entry is a page, post or custom post. You can sort the table by the post_type column- this will make it easier to find what you are looking for. Alternatively, you can use the search bar to search for “page”.

Access where wordpress posts and pages are stored

Export WordPress posts and pages

Now that you know where your WordPress posts and pages are stored, you will be able to easily export them. In order to export a copy of the database directly through phpMyAdmin, go to phpMyAdmin > Export.

Export stored wordpress posts and pages

From here, you can follow the prompts for downloading a .sql export file of your database.

If you are a beginner WordPress user, there is often not much reason to edit your posts and pages outside of the WordPress admin dashboard. However, if you are having an issue with editing certain metadata in WordPress admin, you can fix this directly through the WordPress database.

If you found this tutorial helpful, be sure to check out our other WordPress tutorials.

About Author

Emer has a passion for website development and entrepreneurship, so she is here to give you the information you need to grow your online presence!