Jetpack comes with lots of modules to help you use contact forms, use infinite scroll, shortcodes and much more. These features can help make your self-hosted WordPress site just as powerful as those hosted on WordPress.com. However, there is a downside that comes with the tool, it only works for you online and when logged into WordPress.com.
Basically, you can just use all these features on a live website. Upon activating the plugin, you will immediately see this persistent banner appear at the top of the Dashboard.
Want to know how to make it work offline so you can develop your theme in peace? This is the way. note: before installing Jetpack, make sure your site is running WordPress 3.8 or higher.
Since version 2.2.1, Jetpack has introduced Development Mode, which informs Jetpack that we are in development and it will enable features. Add the following line wp-config.php after
định nghĩa ('JETPACK_DEV_DEBUG', đúng);
If you don’t want to edit wp-config.php or if you don’t have access to the file, you can install this plugin, Run Jetpack locally, instead. It’s a small plugin that contains the following line (basically an alias
add_filter ('jetpack_development_mode', '__return_true');
Now, go to Jetpack > Settings Page. You will see that the banner is now gone and Jetpack is officially in Local Development Mode.
Jetpack is now available offline. Some add-ons will now be enabled, including Infinite Scroll. These activated plugins can work independently of the connection to the WordPress.com API. However, other features like Photon and Statistics will require the WordPress.com API.
An alternative route
If you are not satisfied with the fact that only some features are enabled, there is a way to make them all work while keeping Jetpack running offline.
First of all, let’s make our local website accessible online so that we can connect to WordPress.com; To do so, we will use Local.
Once you have it installed, run the following command in Terminal to put your local server directory online. If you are using MAMP, the directory is most likely located at “/Applications/MAMP/htdocs”.
Now Localtunnel will give you the address where you can access localhost in the browser, like so:
Before you access the website through the given address, you will need to access phpMyAdmin or other similar applications that allow you to look at the website’s database. Open the website database and go to
wp_options table. Then change the website URL in
trang web and
nhà to point to localtunnel, like so.
Access and log in to the website through the new address. Since your site is now online, WordPress.com will be able to access and connect to your site.
And we go, we have a website connected to WordPress.comand you can use all the modules in Jetpack.
Remind: Don’t forget to pass the site address in the wp_options table back later.
You may be wondering that in case we are developing multiple websites offline, should we connect each site in localhost to WordPress.com in this way? Well, you don’t have to.
Once you have 1 website in localhost connected, you can simply copy
jetpack_option value to other sites. To do so, go to phpMyAdmin. inside
wp_options table of the site you connected to WordPress.com, copy all the values of
Paste the value into other sites where Jetpack is already enabled. Now, as you can see below, we can enable and use all the modules offline in other websites that we are developing locally.
Remember that this trick is meant to allow us to use Jetpack while we are testing it with our theme or plugin during development. If you have your website online, you should connect it properly.
Last, Ched All sent you details about the topic “How to Use WordPress Jetpack Offline / WordPress
❤️️”.Hope with useful information that the article “How to Use WordPress Jetpack Offline / WordPress
” It will help readers to be more interested in “How to Use WordPress Jetpack Offline / WordPress
[ ❤️️❤️️ ]”.
Posts “How to Use WordPress Jetpack Offline / WordPress
” posted by on 2023-01-17 13:57:44. Thank you for reading the article at Chedall.com