The wp_posts table has a post_content_filtered column that plugins can use to cache expensive post content filters. The idea is that when you display the page, you don’t read post_content but you read post_content_filtered. This is nice, but it won’t solve your search problem because WordPress by default only looks at post_content and post_title.
You can however do it the other way around: store the editor content in post_content_filtered and the rendered page in post_content (update it periodically with a cron job). There are filters that are called before the post is edited, you can use them to pass post_content_filtered instead of post_content to the editor. So the user will see no difference, but the performance and the search experience will be improved.
Related Posts:
- How do I improve this admin query snippet to avoid generating duplicate results on non-meta searches?
- Is get_option() faster than accessing get_transient()?
- Best practices for using the transients API
- Trouble with Transient API when W3TC is activated [closed]
- Displaying search results in the widget itself?
- How can I free up the memory used by update_post_meta?
- How can I render shortcode so that its not cached by Caching plugins?
- Does WordPress’s HTTP API use any caching?
- Will cron job run if page loaded is being served from cache?
- Is using WP Transients to save external data for a plugin the best/right way?
- Cache directory needed for plugin
- Clearing cached plugin data if it is using an external object cache
- Make WordPress cache permanent for some pages until edited
- Will setcookie work if there is a cache plugin installed?
- Maximum lifetime for nonce
- Clearing caches on plugin uninstall
- How to implement filesystem cache in WordPress
- modify wordpress default search
- what are the checksums surrounding keywords in the SQL generated by WP_Query and do I need to use them too?
- Search the product by tag or category not working
- Search and Filter
- Is using custom table to suit business needs instead of transients a big hit to page load speed?
- Caching the_content calls
- Using ob_get_content to get_search_form puts into infinite loop
- How can I replace the search results displayed by WordPress?
- Service Worker Uncaught (in promise) DOMException
- Should I use wp-content/cache or [PLUGIN_DIR]/cache?
- I need to refresh page to display wp_get_current_user() : why?
- How can I control if post updated
- Showing results from json-string in WordPress search results page
- Ajax action has 200 status but response of No response data available for this request
- Undefined cache functions in my custom plugin
- ajax stopped working when not logged in wordpress
- Get search result count in plugin
- Generate Static Page to Show Search Results/Detail for API
- Is it possible to restore an expired transient?
- Modify search form with plugin
- WP Query Relations / Compare
- WordPress Search Form with Keyword Suggestion
- Simple Search Plugin Does Not Perform Search
- How to search on the field that stores escaped strings?
- Plugin files not updated (cache cleared)
- Change the search results header from plugin
- How to create a custom search form and handler?
- Get custom wp_query search results to appear on search.php
- Why is WordPress wrapping search for users that looks like integers with asterisks and how do I fix it?
- Does WP REST API cache internally executed (rest_do_request) requests?
- Hook a search form anywhere on the site, using a custom plugin
- Query posts which are related via postmeta
- How to call images from your plugins image folder?
- How-to implement admin Ajax inside an admin WP_List_Table?
- What is the etiquette on extending a plug-in
- WordPress REST API call generates nonce twice on every call
- WordPress scheduled task is called but not executed
- How to trap “Publish” button to check for meta box validation?
- How to use filter hook ‘post_updated_messages’ in coherence with action hook ‘save_post’
- wp_mail not recognizing cc and bcc headers
- How can I call “preview post” from wp_remote_get with authentication?
- When is it too late to call the action wp_enqueue_scripts?
- Use js script from one plugin in another plugin
- Plugin Loading Scripts and Styles on Every Page – Even when not being used
- Build dynamic page from cURL (HTML page) response with plugin
- template_redirect for single posts w/ custom fields
- How do I include background images in my stylesheets in a plugin?
- How to deal with equal & similar arguments for a function?
- I’m designing a plugin to create database indexes. Suggestions?
- need to get user ID after a user logs in
- Callback is not called in add_settings_field() when passed as part of an array, but recognises that it’s there. It’s passed Class to Class using OOP
- Plugin translations not installed but… strings are translated!
- Secure Pages Best Practice
- Plugin for Android Marketplace downloads?
- Password field is empty when using wp_signon();
- Putting a resized image into media library with wp_get_image_editor(
- Using ReactJS in the WordPress admin for plugin development
- How to use github to update my plugin
- UWooCommerce – add cart discount programmatically?
- Remove sidebar on single page using plugin API
- When does save_post hook fire on post save/update
- Enqueuing scripts and styles in custom plugins
- Include file in plugin file
- Adding custom stylesheet into header.php using a plugin
- Developing the save function in Gutenberg blocks
- Detect change in site_url and home_url
- Reporting errors in a shortcode plugin
- How do I add a menu item to a Pods admin menu?
- Is there a way to add a link with add_post_meta?
- How to Show Category List With Corresponding Links?
- .htaccess with WordPress – create my own pretty url with parameters (above WordPress settings)
- How do I add a 5 digit ZIP code validation to a Contact7 form?
- How can we stop showing short code in create or edit post section
- Delete Plugin Options with Verify
- How to create custom frontend php page via plugin
- Translation of plugin Upload button
- Changing upload directory for plugin uploads only
- add_filter adds output in the head
- Update option hook not firing
- $_GET vs get_query_var()
- Display months on a drop down calendar as TEXT instead of Numbers
- I want to create a search option for CPT using plugin. The search options should search for categories and tags
- Gutenberg Static blocks: viewScript doesn’t import css for frontend?