How to change page id in Wordpress?

DaRecordon

Well-known member
Joined
Oct 7, 2016
Messages
138
Best answers
0
Ratings
4
Points
18
#1
I want to change my page id in my wordpress blog? how can I do that?
for example, my WP page id is: example.com/?p=62 but i want to change example.com/?p=156 because I tried to check with page id that equals 156 but there is no page there and I can use this id, to be honest, I am using a code to display content according to page id and I want to change them when needed.
 

24x7serverman

Well-known member
Joined
Jul 25, 2017
Messages
651
Best answers
1
Ratings
68 6
Points
28
#2
I would suggest, use the permalink setup instead of updating page ID. If you'd like to update the page ID then you will need to update the database values and it's complicated. If you will assign the permalink structure then it will gibe the best URL and will be useful for SEO ranking.

You can select the required permalink structure from wp-admin > Settings > Permalinks.
 

Dr. McKay

Well-known member
Joined
Nov 26, 2016
Messages
358
Best answers
0
Ratings
26
Points
18
#3
@DaRecordon you can not change page ID directly on Wp-admin that you need to change it from your WP database (MySQL)
because WordPress pages are stored in wp_posts table thus you need to open PHPmyadmin from your web hosting control panel and browse to ID field and edit it.
After update ID there, you can see your page is updated with a new page ID.
 
Latest Threads
Replies
0
Views
1
Replies
0
Views
2
Replies
0
Views
4
Replies
0
Views
13
Recommended Threads
Replies
0
Views
1,196
S
Replies
11
Views
3,449
Replies
1
Views
1,651
Replies
2
Views
1,643

Latest Hosting OffersNew Reviews

Sponsors

Latest Blog ArticlesMost Viewed Threads

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top