Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

How to add post meta to post permalink with still keeping a good performance?

Your code is setting the slug of the post to your custom meta string. That work is done on the admin side and so shouldn’t effect your viewers much.

WordPress will use that slug more or less directly to construct an url and/or load a page. What you have done is not different from hand-writing a slug in the “Permalink” portion of the post form. Performance should be no different than the performance when doing that.

If those meta keys are changing a lot though you could end up having trouble. WordPress will track the slug changes and load the appropriate page but if the slugs are changing constantly you could create a circumstance where a lot of work is required to find the appropriate page.

You are afraid that the performance will be really bad or you know that it is really bad? Be wary of premature optimization.

Related Posts:

  1. Performance of my permalink structure?
  2. Can WordPress realistically handle a site with 500 ‘pages’?
  3. Post ID At The End Of Permalink URL Effects Performance (Positively)?
  4. Performance and styles not working fine after changing permalink structure
  5. Maintaining two permalink structures
  6. Is using %postname% for permalinks really that bad for performance?
  7. Permalink structure with $_SESSION variables
  8. How to Use metada Value in Url and is it possible? [duplicate]
  9. Styles are not loading when changing permalink to %postname%?
  10. Performance and styles not working fine after changing permalink structure
  11. Accidentally Changed Permalink Structure
  12. Is it possible to get a page link from its slug?
  13. Need help with add_rewrite_rule
  14. After server migration only the homepage works
  15. remove “index.php” from permalinks
  16. where is permalink info stored in database?
  17. Changing permalinks gives me 404 errors on nginx
  18. How do I add /blog/ as a prefix to permalink structure for blog posts, tag pages, etc.?
  19. Change media item permalink
  20. Get Permalink without domain (i.e. get relative permalink) [duplicate]
  21. How does WordPress create URLs that Apache knows about?
  22. Strange permalink issue: can’t rename /company-2/ to /company/
  23. Passing and retrieving query vars in wordpress
  24. Get the current page URL (including pagination)
  25. Stop WordPress appending `-2` to the end of my url after i change it
  26. Get default permalink structure from pretty URL’s
  27. How to get permalink and title from post ID?
  28. Why is “/page/2/” not working?
  29. WordPress Permalinks not working in Apache2 Ubuntu 14.04
  30. Permalink format: singular or plural
  31. What is the difference between get_post_permalink and get_permalink?
  32. WordPress matching URLs with trailing tildes
  33. Get current URL (permalink) without /page/{pagenum}/
  34. How does WordPress handle permalinks?
  35. Pretty permalinks for search results with extra query var
  36. Get page permalink without wpurl
  37. How can I get the privacy policy page?
  38. Can I use REST-API on plain permalink format?
  39. WordPress slug issue with non-latin characters
  40. Rewrite Rule for Multilingual Website, Like qTranslate?
  41. How to get pretty URLs with add_query_arg in permalinks
  42. What is the best permalink structure for SEO?
  43. Change author permalink
  44. Creating custom permalink structure for languages
  45. Hide permalink and preview button and link on custom post
  46. Custom post type permalink endpoint
  47. How can I make Capital letter ( upper-case ) permalinks?
  48. How can I reverse engineer a Permalink to Find the Page?
  49. Mapping Domains to Permalinks (not multisite)
  50. How to remove dates from existing permalinks?
  51. How do I set a custom base URL for standard posts?
  52. Removing Parent Page(s) from Permalink
  53. Why permalinks work with /index.php/%postname% but not with just %postname%?
  54. Setting up WordPress with Custom Permalinks and no .htaccess File?
  55. Getting the Site URL Including the Front Base
  56. Does WordPress Change the .htaccess File When Updating?
  57. Using $_GET variables in the URL?
  58. Removing the redirect after changing a page’s slug
  59. How to display a public profile page for registered users with custom slug?
  60. Removing leading zeros from custom permalink structure
  61. Must slugs be unique?
  62. Setting 404 page in Nginx
  63. How to get the clean permalink in a draft?
  64. How to use relative links on my pages?
  65. How does wordpress keep track of post id when post id is not used in permalinks?
  66. How to filter to output of the get_permalink() function
  67. Stop WordPress from reserving slugs for media items?
  68. Including category-base in a post permalink results in 404
  69. How to change ‘with_front” key from an existing custom post type?
  70. Change slug on post creation
  71. Does WordPress automatically do 301 redirect if I change permalink
  72. How can I store page ID in a post instead of other selected permalink?
  73. WordPress Permalink changes to question mark (?) in URL
  74. WordPress thinks my custom route is a 404
  75. Prevent WordPress from abbreviating-long-slugs…-in-the-admin
  76. Adding another word in front of post url
  77. Permalink with sub-sub-category and post name
  78. Post type child of another post type
  79. Permalink not working for page without title
  80. Remove index.php in permalink structure on IIS server
  81. What is the difference between get_permalink vs get_the_permalink?
  82. Page begins with number, WordPress adds 2
  83. Move WordPress to subdirectory, keep ALL URLs
  84. How would I create a different permalink structure for pages and posts?
  85. My permalinks are broken! Can I use mod_rewrite to ignore a physical file?
  86. Custom Taxonomy in Permalink of Post
  87. Is the permalink structure /%post_id%/%postname% faster or slower than just /%postname%?
  88. WooCommerce return 404 on category pages
  89. How to prevent apostrophes and quotes from appearing in permalinks?
  90. Minimal custom permalink structure
  91. the_permalink displays post ID URL for future posts
  92. Why does `get_permalink()` produces an add. DB request without $post->filter?
  93. WordPress 4.4+ breaks Walker Extension
  94. permalink independent on the post’s name stored in the database
  95. What is the most efficient way of querying posts based on visits and date for current day?
  96. Date based URLs for custom posts and pagination
  97. Archive permalinks
  98. Regex in add_rewrite_tag not accepting OR operators?
  99. Removing hierarchical pages in the permalink
  100. How to add a custom URL placeholder to author archives?
Categories permalinks Tags performance, permalinks, post-meta
How to redirect logged out users to specific page?
I can’t connect my custom jquery to wp admin

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress