Last active
September 21, 2022 09:18
-
-
Save otakupahp/48f3b5d76f1283b99226b071ae378b36 to your computer and use it in GitHub Desktop.
Run Jetpack Instant Search locally
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Replace table name as needed | |
SELECT * FROM `wp_options` WHERE `option_name` LIKE '%jetpack_search%' ORDER BY option_name ASC; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// If we are on localhost, force Jetpack online | |
if ( defined( 'WP_LOCAL_DEV' ) && WP_LOCAL_DEV ) { | |
add_filter( 'jetpack_offline_mode', '__return_false' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
REQUIREMENT
Run the SQL in your staging database, you should get something like this:
![imagen](https://user-images.githubusercontent.com/26227907/167191843-5edd9584-aeaf-4985-bdf3-38e1fb608d99.png)
Copy the options jetpack_search_plan_info and jetpack_search_ever_supported_search into your local database
Note: If you can't access the staging database but have the SQL, you can do a manual search with a text editor, or import the DB locally and look for that data there.
Add the PHP filter at your functions.php file, inside a plugin or a mu-plugin.
If you access to the Jetpack dashboard, and you won't see the Search menu, you could access manually by adding
admin.php?page=jetpack-search
to thewp-admin
pathTo configure the search, paste
admin.php?page=jetpack-search-configure
to thewp-admin
path