banner



How To Change In Wordpress Post To Page

How to Convert a Post to a Page in WordPress

How to Convert a Post to a Folio in WordPress without Unsafe SQL

Convert a Post to a Page in WordPress

The Difference Between Posts and Pages

Posts and pages serv­east very different purposes in WordPress. When you write a post, it shows up on the front folio of your blog, and you can place it into different categories so that your readers can view all posts of a specific category in 1 place. In improver, it typically has post data displayed near the header. All of this is to indicate that a post is somewhat "ephemeral". The date of publication is relevant. Users tin likewise comment on posts by default, which means information technology'southward interactive.

A page on the other hand is associated more with "static" content. It's less time dependent than a postal service. most themes don't display the appointment of publication, since it's irrelevant. In addition, your viewers unremarkably don't have the option to annotate on pages. For example, why would you demand feedback on an "About" folio? Or a contact page? It doesn't make sense.

For this reason, pages are usually placed in menus either at the superlative of your site, or at the sidebar. Without that, there's no automatic "link pathway" to pages. With posts, you can accomplish any given post by merely navigating to the date archives, or the category archives, just simply continue pressing the "Next" or "Forward" buttons on your homepage to coil through all posts. But pages demand to be linked to specifically, or else they get lost in your content.

Why Convert a Post to a Page?

It's very easy to accidentally create a postal service instead of a page. For 1 thing, posts are a lot more common than pages, so nearly people but create a post by default. I've done it myself several times! And the WordPress editor treats them both as exactly the same unless you have some specific customizations that are immediately visible.

Often you lot won't even find the difference until afteryou've published the post and you meet that it has a comments section! Or that it shows upwardly on your site blog when that simply doesn't make sense if you've just published a "Terms and Conditions" post for instance!

Of course, you tin just create a new page, copy over the content of the postal service, delete the original post, re-create the URL, and publish the new page. But personally, I would feel uncomfortable with such a maneuver. I don't like the thought of deleting a post and recreating a page with the same content.

So, it'south much more than elegant to just catechumen the post to a folio. In this tutorial, I'll show yous how that'south washed. Normally, tutorials on how to do this recommend updating your database via SQL. But this can be dangerous if something goes wrong. So my tutorial volition simply use "rubber" SQL for searching, simply won't actually update the database.

For updating nosotros'll use the regular phpMyAdmin GUI, making it impossible to break your site.

Alert: Yet, earlier doing any of these, make sure you lot backup your databases first!

Using phpMyAdmin to Convert a Post to a Page in WordPress

Non everyone wants to install a WordPress plugin and add to their maintenance headaches. Specially when it's just a "one off" job like converting a mail to a page. And then nosotros're doing to go in and exercise information technology through the backend.

Step i: Open phpMyAdmin from cPanel

Log into your web hosting provider's cPanel and search for the words "phpMyAdmin". This is a ubiquitous backend database tool for MySQL installed on every cPanel implementation that I've seen:

phpmyadmin

This will bring up the login screen for the databases. You should have received this in your welcome mail when you first gear up your hosting business relationship.

Pace 2: Locate your Database from within phpMyAdmin

If you have several WordPress installations, or accept other databases similar the ones created by Joomla etc, and so you lot'll have a separate database for each of these installations. You'll need to find the right one for your current WordPress site.

Ane way to practice this is by examining your wp-config.php file in your WordPress installation folder and getting the database proper name from the "DB_NAME" variable like this:

wordpress database settings

Another mode is to aggrandize each database past clicking the plus (+) sign and searching for signs of plugins that you've installed only on the ane yous want. Either way, make sure that yous get the correct database before proceeding farther!

Pace 3: Open the "posts" Table

Unremarkably the table yous want is called "wp_posts". But for security reasons, many WordPress sites rename the default prefix of their tables to something other than "wp". Certain security plugins do this for you besides. So find the table ending with "_posts" and click it.

This volition aggrandize the table and bring upwardly all the rows – each of which is either a post, a folio, or a revision, or another type of custom post type.

Pace 4: Detect the Original ID of the Post y'all Want

This can be a two-step process. The easiest way to find the ID of your post is to wait at its "Edit URL". This is the URL you see in the accost bar when editing the mail service in the WordPress editor.

Alternatively, hover your mouse over the "Edit" for the post and you'll run across it in the condition bar like this:

Edit WordPress Post

Here, the ID of my exam post is 693. Now that you have the postal service ID, move to footstep 4.

Stride 5: Locate the Row using the Postal service ID

This is the only SQL you need to use, and it'southward "safe" because information technology doesn't update, or delete annihilation from the backend. Commencement, while viewing the right "posts" tabular array we identified in Step 3, click the SQL tab as shown here:

sql select wordpress post

Now blazon in the post-obit SQL command in the editor like demonstrated:

SELECT * FROM `[table proper noun]` WHERE `ID` = [post ID]

Supersede [table name] with the table name you lot got in Step 3, and [post_ID]with the post ID you isolated in Footstep 4.

This should filter the rows and testify you lot the post in question as in this screenshot:

phpmyadmin edit wordpress post

Sometimes, the posts table stores records for revisions or other things. So just scroll to the right of the row to make sure that the "post_parent" cavalcade shows "0" like this:

wordpress post_parent

If non, then annotation the ID of the post parent and repeat the above SQL query with the mail service parent ID. This fourth dimension, the row you lot get should be the original post that you desire to change.

Stride 6: Change the Post Blazon to "Page"

Click the "Edit" button on the left of the row as shown in the screenshot in Step v. This will open the record for editing. Scroll down till yous find the field labeled "post_type", and supervene upon the value "post" with "page" equally shown hither:

wordpress change post_type

Now click the button called "Become" on the bottom right. The query will process and you lot're done! Your mail is at present a folio. Visit the URL and confirm that there'south no comment box. Technically, we could have accomplished the update with another SQL query, but I like to avoid making updates or changes to my backend databases via manual SQL. If something goes incorrect, it'll suspension my site.

So this is a safe manner to convert a post to a page in WordPress. I've used information technology many times, and I hope you find it as useful equally I have!

Digiprove seal This content has been Digiproved © 2018 Tribulant Software

Source: https://tribulant.com/blog/wordpress/how-to-convert-a-post-to-a-page-in-wordpress/

Posted by: smileyfres1968.blogspot.com

0 Response to "How To Change In Wordpress Post To Page"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel