Nexcess Logo

How to Use Elasticsearch with WordPress & WooCommerce

Knowledge Base Home

Notice anything different?

We've enhanced the appearance of our portal and we're working on updating screenshots. Things might look different, but the functionality remains the same.
April 02, 2021

Using Elasticsearch with the ElasticPress plugin, you can significantly improve website search speed and quality if your website runs WordPress/WooCommerce.

ElasticPress Plugin: How to Use Elasticsearch with WordPress & WooCommerce on a PHP Elasticsearch Host

About the Potentially Slow Default WordPress & WooCommerce Search Engine

The default WordPress search can be very slow and if you are trying to query a number of posts can take forever to return any relevant information. Having a fast and relevant search on your site will help visitors and customers find what they are looking for.

How to Use Elasticsearch on Managed WordPress and Managed WooCommerce Sites

One of the better options to improve site search on a WordPress site, as well as a site running WooCommerce, is to use Elasticsearch for your Nexcess Cloud Account with the ElasticPress plugin.


Elasticsearch Host — What is Elasticsearch?

Elasticsearch is an open source, broadly distributed search engine capable of improving the speed and scalability of search for enterprise-grade websites.

Built on Apache Lucene and developed in JavaElasticsearch is a very powerful distributed, open-source search and analytics engine. 

With Elasticsearch you can store, search, and analyze huge volumes of data in near real-time and give back answers in milliseconds by searching on indices rather than text directly.

Elasticsearch’s primary uses include website search, application search, enterprise search, logging and log analytics, security and business analytics, and infrastructure metrics and container monitoring. Elasticsearch continues to grow in popularity and is the search solution for the majority of websites we use on the Internet.

Elasticsearch Host — Why Use Elasticsearch?

Elasticsearch is very fast, so if search performance is required for your enterprise or website, it is a leading solution to consider. Because is built on top of Apache Lucene, a high-performance text search engine library written in Java, it excels at full-text search. 

Elasticsearch is also a near real-time search platform, in that the delay from the time a document is indexed until it becomes searchable is very short — typically a second or less.

Elasticsearch Host — Elasticsearch Solutions on the Nexcess Cloud

How to Use Elasticsearch — What are Nexcess Cloud Containers?

Nexcess Cloud Containers are units of software that can be added to your cloud solution to expand performance, functionality, and management. Containers are lightweight, secure, and external instances that will not take resources from your main cloud solution.

How to Use Elasticsearch — Elasticsearch & Ecommerce Websites on the Nexcess Cloud

Elasticsearch on the Nexcess Cloud is an enterprise, containerized search engine engineered to improve ecommerce product search. You can link your Elasticsearch solution to an installed Kibana instance for in-depth analytics.

How to Use Elasticsearch — Why Use Elasticsearch with the Nexcess Cloud?

Elasticsearch provides an easy, fast, and scalable alternative for merchants looking to improve product search. It quickly indexes an online store’s entire catalog to provide fast and accurate search experiences.

How to Use Elasticsearch — Is It Difficult to Activate Elasticsearch with the Nexcess Cloud?

Activate Elasticsearch with just a few clicks in your Nexcess Client Portal and quick installation and configuration the ElasticPress plugin for WordPress/WooCommerceAll indexing is automatic, allowing your customers near-instant access to the benefits of improved search.

Elasticsearch Solution Price Comparison: Nexcess vs. the Competition 

Elasticsearch Host — Nexcess Elasticsearch Container Plans by Size & Resources Included: CPU, RAM & GBs of Storage

Nexcess offers monthly rates for adding on the Elasticsearch Capability via Nexcess Elasticsearch Container Plans staring at $20 a month:

Elasticsearch Host — WPEngine Elasticsearch Capability

WPEngine offers monthly rates for adding on the Elasticsearch Capability starting at $72 a month.

Elasticsearch Host — Bluehost Elasticsearch Capability

Bluehost offers monthly rates for adding on the Elasticsearch Capability starting at $50 a month.

Elasticsearch Host — Cloudways Elasticsearch Capability

Cloudways offers monthly rates for adding on the Elasticsearch Capability starting at $70 a month.

Elasticsearch Host — Kinsta Elasticsearch Capability

Kinsta offers monthly rates for adding on the Elasticsearch Capability starting at $100 a month.

Elasticsearch Host — Pagely Elasticsearch Capability

Pagely offers the Elasticsearch Capability if you sign up for a $1,000 a month plan.

How to Use Elasticsearch: Enabling Elasticsearch for WordPress/WooCommerce with the ElasticPress Plugin

You can install the ElasticPress  plugin from the wp-admin dashboard by navigating to the Plugins > Add New option and then searching for elasticpress and then install and activate the plugin:

Plugins > Add New

In order to be able to use the ElasticPress plugin to power your site search, you will need to enable the Nexcess Elasticsearch Container Plan for your site in the Nexcess Portal.

The Endpoint (host) and Port number can be found from the Containers Tab in the Nexcess Portal. That information will need to be added to the site’s wp-config.php file.

Endpoint (host) and Port number

An example of the Elasticsearch host information and Port number are given below: 

/** ElasticPress */
define( 'EP_HOST', '' );

You will need the change the host URL and the Port based on the information shown in the Nexcess Portal. 

Site content can be indexed from the ElasticPress settings in the wp-admin dashboard

ElasticPress settings in the wp-admin dashboard

WooCommerce settings will be defaulted enabled to index WooCommerce content on the site.

ElasticPress Settings

How to Use Elasticsearch — WordPress Command Line Interface (WP-CLI) Reference Guide

Having a number of product posts or posts will take a while to index, which is why on those sites it is worth running the index using the appropriate WP-CLI command. Below are examples of the various WP-CLI commands related to the ElasticPress plugin that you will want to use. 

To install and activate the ElasticPress plugin run:

wp plugin install elasticpress --activate

To index and setup ElasticPress plugin run:

wp elasticpress index --setup

Once all of the content has been indexed this is what you will see in the terminal:

Number of posts indexed: 15463
Total time elapsed: 465.652
Success: Done!

To index and setup ElasticPress plugin to include posts and products:

wp elasticpress index --setup --post-type="products,posts"

To delete the existing index in Elasticsearch from the site run:

wp elasticpress delete-index

To get the status of ElasticPress run:

wp elasticpress status

To get the stats of ElasticPress run:

wp elasticpress stats

Which will return a response similar to the following example.

[a134d331@cloudhost-139961 public_html]$ wp elasticpress stats
====== Stats for: 3b1012aedenxclinet-post-1 ======
Documents: 15463
Index Size: 290.31 MB
Index Size (including replicas): 290.31 MB
====== End Stats ======

Also, from within the wp-admin dashboard on your site, you can see the index health of Elasticsearch directly in ElasticPress by navigating to the following option:

ElasticPress > Index Health

ElasticPress > Index Health

Note: The Autosuggest Feature in ElasticPress due to how the endpoint needs to work may not work on the site.

Conclusion: How to Use Elasticsearch on Managed WordPress and Managed WooCommerce Sites with Nexcess as Your Elasticsearch Host

A Nexcess Elasticsearch Cloud Container used with ElasticPress will improve the search on your site and well as help customers and visitors be able to find what they are looking for. Performance is king on the Internet so why not enhance your site search speeds?

Our Support Team can help you set up and configure ElasticPress if you ever get stuck along the way. Outstanding performance combined with free automatic backups, 24/7 support, and top-notch security is what makes Nexcess the best WordPress hosting company in the industry.

Check out our Fully Managed WordPress Hosting Plans to get started today.

Scale Your WordPress/WooCommerce Solution with Nexcess

Managed WordPress and WooCommerce plans are scalable hosting plans that allocate 10 or more PHP workers per site. For static blogs or similar sites, that should be more than enough to have them work flawlessly, while other, more complicated websites will easily find their home within other Managed WordPress Hosting and Managed WooCommerce Hosting plans. These hosting plans also come with an excellent 24/7/365 support team ready to help with any glitches that might arise along the way!

See what industry insiders have to say about Nexess and its use of PHP workers:

Other Useful WordPress Links for Developers & Admins

Further Reading for Performance Tuning WordPress

In addition to the increase in site performance by regular WordPress maintenance of WordPress transients, you can see an increase in site performance by:

You can find answers to your other WordPress questions in our Nexcess Knowledge Base.

Managed Hosting with Nexcess

Hosting optimized for the industry's leading platforms, including Managed WordPress Hosting, Managed WooCommerce Hosting, and Managed Magento Hosting:

Build Better Sites and Stores With Fully Managed Hosting from Nexcess 

Faster Speeds, Stronger Security, Inherent Scalability and Trusted Support.

Our range of hosting plans caters to any business scale. We do all the heavy lifting for you to focus on growing your business. In addition, we automatically update ore components and plugins to the latest version and ensure your hosting environment is properly optimized, secured, and updated.

Nexcess infrastructure was specially designed to keep up the best speed and performance in the industry. No traffic surge can threaten your website to go down thanks to our autoscaling technology which adds more resources to your server to handle the load. In addition, we offer always-on security monitoring and support from web hosting experts 24/7/365 and a built-in CDN with 22 locations and advanced caching for ultra-fast loading.

All hosting plans include The Nexcess 30-Day Web Hosting Money Back Guarantee.

Need a No-Code Website Building Solution? 

Are you on an accelerated schedule and already ready to move forward? If you need to get started with your Nexcess StoreBuilder Solution sooner rather than later, check out these resources:

Next Steps with a Nexcess Cloud Hosting Solution?

Read more about the Fully Managed Cloud Environment by Nexcess and its benefits for your business.

A Cloud Hosting Solution That Lets You Do Business Your Way 

We believe in the promise of cloud: scalability, security, performance, and ease of use. Together with our team, clients, and partners, we’ve built something better.

Choose From Multiple Applications 

Whether you’re a small business or a high-traffic eCommerce store, our cloud hosting solutions are designed around your needs: auto scaling, PCI compliance, and comprehensive development tools provide you with maximum dynamic flexibility in a fully managed cloud environment.

We make applications easy with environment optimizations for:

And there are many more!

We also have a variety of Nexcess support articles about how best to implement our product offerings housed in the Nexcess Knowledge Baseincluding how to get your site going with a number of different configuration options. These resources include a great article on setting this up for Migrating to Nexcess with managed WordPress and managed WooCommerce hosting

About the Nexcess Portal

Starting with a new hosting partner can be overwhelming. For that exact reason, we have prepared a Nexcess Portal Guide to make each client’s introduction to our Nexcess Portal easier.

How to Become a Nexcess Portal Pro 

You signed up for an account with Nexcess but now what do you do? New systems can be intimidating to learn, so we’ve put together this guide to help explain what is in the portal and where to find it.

Next Steps with Fully Managed WordPress Hosting?

Read more about the Fully Managed WordPress Hosting and its benefits for your business.

Build Better Websites with Fully Managed WordPress Hosting 

It’s hosting optimized for WordPress. That means a faster, more secure and scalable website. Smart monitoring tools are built-in to help you keep it that way. 

It’s why WordPress Users Trust Nexcess Hosting.

We also have a variety of Nexcess support articles about WordPressincluding how to get your site going with a number of different configuration options. These resources include a great article on setting this up for Migrating to Nexcess with managed WordPress and managed WooCommerce hosting

Considering Use of a CDN?

Many businesspeople wonder how a CDN speeds up your ecommerce site, but they will discover that the reasons are remarkably straightforward. Review the content, resources, and links in this article to learn more about those reasons in full detail.  

24-Hour Assistance

If you need any assistance with the above-mentioned, don't hesitate to reach out. For 24-hour assistance any day of the year, Nexcess customers can contact our support team by email or through your Client Portal.

Useful YouTube > Nexcess Channel Links

Resources for More Information

Need more help? The Applications, WooCommerceand WordPress sections within the Nexcess Knowledge Base are important resources for those seeking additional knowledge. Or, check out our related articles below.

The Applications section also contains valuable insights for those seeking additional knowledge about our other various hosted applications and platforms. Check out our related video playlists and articles below:

New Customers: Fully Managed Hosting Solutions

Not a Nexcess customer yet? Check out our fully managed hosting solutions. The option to chat with an expert is also available.

Related Articles

Luke Cavanagh
Luke Cavanagh

Luke Cavanagh, Strategic Support & Accelerant at Liquid Web, brings a decade of experience working with WordPress and WooCommerce to our product team. His GitHub page offers a glimpse into his multiple areas of subject matter expertise.

"Ninja stuff with WordPress and WooCommerce," is an apropos way to describe Luke's savviness with these platforms — and his way of influencing our organization for improving to them.

Coming out of the University of Brighton with a Business and Technology Education Council (BTEC) Higher National Diploma (HND) in 2D & 3D Design, Luke's credentials prepared him well for his current role that blends both web development and design. His HND credential leveraged his foundational learning at West Kent College, where is received a National Diploma (ND) in Graphic Design.

In his personal life, Luke is a devoted husband and teen wrangler. He considers himself a Synthwave enthusiast, Jerry Goldsmith fan, and Doctor Who aficionado. He is happy to introduce his friends and teammates to essential vocabulary for life found only in British English, such as "gubbins" and similar terms.

We use cookies to understand how you interact with our site, to personalize and streamline your experience, and to tailor advertising. By continuing to use our site, you accept our use of cookies and accept our Privacy Policy.