Where Are WordPress HTML Pages Stored?
You may be wondering where are wordpress posts stored and where does wordpress store pages.
I would describe it as a bit unusual especially if you’re not familiar with how WordPress works.
The content of your posts and pages is stored by WordPress in your database’s wp_posts table.
Since WordPress uses dynamic PHP templates to view your content, each page on your site does not store an individual HTML file.
Back in the day, everything was created via .html and that file was stored on your web server.
Nowadays, those files are loaded into your database rather than an HTML file.
Where are wordpress pages stored in the database
You can access your database via cpanel. Your page and post content will be located in wp_posts database table.
If you want to view or modify the data in your database, you’ll need to have access to your cPanel details provided by your web hosting company.
When you log into your cPanel, you will see a bunch of menus. You’ll need to access the database section.
Your cPanel may have a different UI (user interface) however, you should have access to phpMyAdmin.
Note: Unless you know what you are doing, you should not attempt to edit your database. There is no justification for editing the page/post data outside of the WordPress dashboard in the vast majority of cases.
Once you’re in cPanel and you’ve found phpMyAdmin, click on it to access phpMyAdmin.
There, you should find your databases.
It will look something like this:
We had to scratch out our actual database tables but you get the point.
If you installed WordPress with an auto installer, you might see an account labeled name_wp854. Look for the “wp” for WordPress.
Once you select a database, you will be presented with a list of database tables:
Look for something along the lines of: wp_posts
Once you find your wp_post table, click on it. On the right hand side, you’ll see all your pages and post in data format.
For each object, each column in the table contains a certain form of metadata. For example, for the post title, post material, extract, post status, comment status, etc. There are columns.
This table includes a lot of things that would not be very valuable to you.
If you are looking for a specific type of content, you may filter the table by the post-type column. E.g. an article or a page. You may also use the search bar to search for for example the word ‘blog’.
This is where WordPress stores posts and pages.
You can easily edit any of the components directly from here in order to manage the content or metadata associated with a particular page or post.
What if you can’t find your wordpress database? Continue reading to find out what database your wordpress uses.
How do I find my wordpress database
If you have multiple databases distinguishing which is the correct way is an easy process.
First, access cPanel then head over to file manager.
Once you’re in the file manager go to the root directory of your website.
For the most part, it will be a folder called public_html
Expand that folder and locate your wp-config.php file
Right click on wp-config.php and select view.
It will open up your wp-config.php file.
You’ll need to located your database here.
It will look something like: define(‘DB_NAME’, ‘name_wp845’);
“Name” will be your username for cpanel. So if your username was: jaggedballon
It will be define(‘DB_NAME’, ‘jaggedballon_wp845’);
Wp stands for wordpress and the number 845 will be different.
Back up your wordpress database
Your web hosting provider should automatically be making regular backups of your site. However, if you feel the need to take extra precaution and want to manually backup your wordpress database then continue reading to find out how.
Also note, to make life easier, try wordpress database backup plugins and set them to regularly make backups.
However, here is how to do it manually.
Again, access phpMyAdmin.
When you’re in your database. Click on the tab that says “export”
From here, simply follow the instructions to export your database as a .sql file.
In case something goes wrong, you can restore your backup later by using the “Import” tab.
How to convert a wordpress site to basic html
There are many reasons for wanting to convert your wordpress site to a static html website.
One reason could be that your site doesn’t require constant updating and you simply want to speed up your site.
Or maybe you designed a site for a local client and their site is basically an information type site which explains their business hours etc.
These sites don’t normally have to be changed often or updated. By converting them to static html you’ll speed the site up and not have to worry about WordPress updates, etc.
There are multiple ways to convert your wordpress site to a static html site. The fastest and easiest way is to download a plugin that does this for you.
Simply Static WordPress Plugin
A good plugin for this would be simply static.
Install the plugin and follow the prompts to convert your wordpress site into html.
If you plan to transfer these files to your client, select zip archive so that everything is stored into a .zip file for easy transfer.
HTTrack to convert WordPress to Static HTML
You can download the open source application at http://www.httrack.com/page/2/en/index.html
Select the version compatible with your operating system.
Select the Download website(s) from the Action menu.
Enter the URL of the WordPress installation you want to download in the Web Address (URL) box, you can add more websites by pressing the Add URL option.
Click the Next button and then the Finish button to begin the conversion and the downloading process.
In summary, the content of your posts and pages is stored in your database’s wp posts table, while your post and page templates are stored at /wp-content/themes/your-theme/ in your file system.
As the WordPress dashboard handles this very well, there’s usually no need to edit your posts and pages from the database. If you’re having trouble editing any relevant metadata in the admin area of WordPress, however, going straight to the database can be a surefire remedy.
Please feel free to leave a comment below if you have any questions concerning your WordPress database or file structure!
If you want to improve the speed and security of your website, the ability to create HTML website files for your WP website is something you will need to consider.
Converting the WordPress website eliminates the complex features that depend on PHP, such as comments, communication forms, e-commerce and others.
As such for comments, you can suggest third-party resources such as Discuss or Facebook, as well as other third-party solutions to perform dynamic functions that are not supported by a static website.
If you enjoyed this post, be sure to check out: how quickly should a website load