If you want to add whatsapp button to website, the quickest method is to link a visible button to your WhatsApp number using a wa.me URL. This guide shows a free plugin method, a no-plugin HTML method, pre-filled messages, mobile checks and a simple way to measure clicks.
What you need before you start
Prepare these three things:
- A WordPress administrator account, or enough access to install plugins and edit the page where the button will appear.
- The WhatsApp number that should receive enquiries.
- The short message you want customers to see when the chat opens, such as “Hi, I found your website and would like to know more.”
Use a business number if possible. A website button can bring messages from new visitors, so decide who will reply and during which hours before you publish it.
If you have not created the site yet, HostKarle’s WordPress hosting plans include one-click WordPress installation through Softaculous. For a local shop, service provider or tuition centre, you can also compare the options on the small-business hosting page.
The wa.me link explained
WhatsApp’s click-to-chat format is:
https://wa.me/<full-number-in-international-format>
For an Indian number, replace the leading 0 with India’s country code 91. Enter digits only: do not use +, spaces, brackets or dashes.
For example, if the local number is 09876543210, the link becomes:
https://wa.me/919876543210
The link can be attached to normal text, a WordPress Button block, an image or a floating chat button. When someone selects it, WhatsApp opens on a phone or WhatsApp Web on a computer, provided the number has an active WhatsApp account. See the official WhatsApp click-to-chat instructions for the number rules and message format.
Add a pre-filled message
Add ?text= followed by a URL-encoded message:
https://wa.me/919876543210?text=Hi%2C%20I%27d%20like%20to%20know%20more%20about%20your%20services.
Spaces become %20, a comma becomes %2C, and an apostrophe becomes %27. Keep the message short. A visitor should be able to read it, edit it and send it without removing a long paragraph.
Step 1: Choose where the button should appear
Decide whether you need one inline button or a floating WhatsApp button across the site.
Why this matters: the button should be easy to find without hiding the content or controls that visitors need next.
Use an inline button when the visitor is already reading a contact, service or product page. Use a floating button when customers may need to contact you from several pages. On a small mobile screen, check that a floating control does not cover your cookie notice, menu or checkout button.
For most small websites, start with one clear button on the contact page and one near the main service or enquiry section. More buttons do not automatically create more conversations; clear wording and a working destination matter more.
Success looks like this: you have chosen a page, position and button label that fit your visitors’ most likely question.
Step 2: Install a free WhatsApp plugin
A plugin is the easiest choice if you want a floating button without editing code. WordPress recommends checking a plugin’s compatibility information and keeping installed plugins updated. You can read the current process in its official plugin management documentation.
For this example, use Add Chat App Button from the WordPress Plugin Directory. Its settings include a WhatsApp number, a default message and several button display choices. Plugin names and settings can change, so confirm the listing and compatibility shown in your own dashboard before installing.
- Sign in to
yourdomain.com/wp-admin. - Go to Plugins → Add New.
- Search for Add Chat App Button.
- Open the plugin details and check that it is compatible with your WordPress version.
- Select Install Now, then select Activate.
- Open Settings → Add Chat App Button.
- Enable the button and enter your full international WhatsApp number using digits only. For India, that means starting with
91, not0or+91. - Add your default message, choose the button style and save the settings.
Why this works: the plugin creates a standard click-to-chat link and handles the floating placement for you.
Success looks like this: a WhatsApp button appears on the selected pages, and selecting it opens a chat with the correct number and message.
Do not install several WhatsApp button plugins at the same time. They can create duplicate floating buttons, conflicting settings or unnecessary visual clutter. If you change plugins, deactivate the old one first and check the front end again.
Step 3: Add a button without a plugin
The no-plugin method keeps the site simple: create the wa.me URL, then attach it to a WordPress Button block or to a Custom HTML block. This is useful for a contact page, a hero section or a service page where you control the exact placement.
Option A: use the WordPress Button block
- Edit the page where you want the chat link.
- Select Add block (+) → Buttons.
- Enter a clear label such as Chat with us on WhatsApp.
- Paste your
wa.meURL into the button link field. - Turn on the option to open the link in a new tab if your theme provides it.
- Save or update the page.
Why this works: the Button block gives you a clickable call to action while your theme controls the design.
Success looks like this: the button is visible in the page preview, has readable text and opens the intended WhatsApp chat when selected.
Option B: paste a small HTML link
If your WordPress role allows a Custom HTML block, add one from the block inserter and paste this example. Replace the number and message before saving:
<a href="https://wa.me/919876543210?text=Hi%2C%20I%27d%20like%20to%20know%20more%20about%20your%20services." target="_blank" rel="noopener">Chat with us on WhatsApp</a>
This is a link with button-like wording; your theme may display it as a normal text link. For a styled button without a plugin, use the WordPress Button block instead, or apply an existing theme style to the link. Do not add JavaScript just to open WhatsApp.
Why this works: the link sends the visitor directly to WhatsApp and adds no plugin setting to maintain.
Success looks like this: the saved page contains one visible link, and the URL in your browser status preview begins with https://wa.me/.
Step 4: Use the right number and message
The number is the most common reason a WhatsApp button fails. Check it character by character:
Why this matters: WhatsApp reads the destination number from the URL, not from the visible button text.
| Check | Correct example | Avoid |
|---|---|---|
| Country code | 919876543210 | A local number beginning with 0 |
| Symbols | Digits only | +91, spaces, brackets and dashes |
| Link | https://wa.me/919876543210 | A made-up or shortened URL |
| Message | URL-encoded text after ?text= | Unescaped spaces and special characters |
Use a useful message that gives context. For a tuition centre, it could be “Hi, I want to ask about the next batch.” For a repair shop, it could be “Hi, I need help with a repair enquiry.” Do not pre-fill sensitive information such as a customer’s password, payment details or private address.
If different pages attract different questions, you can use a different message on each page. For example, a service page can identify the service name, while a contact page can simply ask the visitor to introduce themselves. Keep the recipient number the same unless your business genuinely has separate teams.
Success looks like this: the correct person receives a short, editable message with enough context to begin the reply.
Step 5: Set up WhatsApp Business for replies
The button only starts the conversation. Your reply process determines whether the enquiry becomes useful.
Why this matters: a working button is only helpful when someone can respond consistently after the visitor clicks it.
Set a clear profile name, category and business description in WhatsApp Business if you use that app. Add your opening hours and a short greeting so a new visitor knows what to expect. Keep the greeting human and specific; “Tell us what you need help with and your preferred time” is more useful than a generic sales message.
Choose one person to monitor new chats on working days. If several people handle enquiries, agree on who owns a conversation after the first reply. This prevents a visitor from receiving repeated or contradictory answers.
Review the button after changing your phone, WhatsApp account or business process. A link can remain technically valid while sending customers to a number nobody checks.
Success looks like this: visitors know what to expect, and your team knows who will handle each new enquiry.
Step 6: Track WhatsApp button clicks
A click is not the same as a sent message, because your website cannot confirm whether the visitor completed the conversation in WhatsApp. You can still measure whether people select the button.
Why this matters: click data helps you compare pages and button placements without claiming that every click became a conversation.
If your website already uses Google Analytics 4:
- Open the relevant web data stream in Google Analytics.
- Make sure Enhanced measurement is enabled.
- Open Reports → Engagement → Events and look for the outbound click event.
- Filter or explore the link URL and link domain to identify clicks to
wa.me.
Google says enhanced measurement can record outbound clicks, including button links, without changes to page code. Treat this as a website-click count, not a count of completed WhatsApp conversations. If your analytics setup does not use GA4, your analytics provider may offer a similar outbound-link report.
Track the page and button destination separately where possible. A contact-page button and a product-page button may have different visitor intent, even if they use the same phone number.
Success looks like this: you can identify which page and link URL receive clicks, then improve the placement or message based on that evidence.
Verify the button before you publish
Test the complete path, not just the colour and position:
- Open the published page in a private browser window.
- Select the button on a phone and confirm that it opens the WhatsApp app.
- Open the same page on a computer and confirm that WhatsApp Web or the browser hand-off works.
- Check the recipient number shown in the chat.
- Check that the pre-filled message is readable and easy to edit.
- Test the button from a page where visitors are likely to use it, such as a service or pricing page.
- Check the page at a narrow mobile width so the button does not cover other controls.
If you host WordPress on DirectAdmin and are still setting up the site, this WordPress installation guide for DirectAdmin covers the initial setup before you add contact buttons.
Troubleshooting a WhatsApp button
The link opens an error page
Check that the URL starts with https://wa.me/, contains the full country code and has digits only. Remove the leading local zero, plus sign, spaces and punctuation. Test the plain number link first; add the pre-filled message only after the basic link works.
WhatsApp opens the wrong contact
The number in the URL is wrong or has an extra digit. Copy the number from the WhatsApp account that should receive enquiries, rebuild the link and test it from a private window. Do not rely on the number displayed in the button label; the destination URL is what controls the chat.
The message contains strange characters
Encode spaces and punctuation in the text value. The safest workflow is to write the message in a URL encoder, copy the encoded part after ?text=, and then test it on both phone and desktop.
The floating button does not appear
Confirm that the plugin is active, its button setting is enabled and the page is not excluded by a display rule. Clear any page cache, then check the public page rather than only the logged-in preview. If another button plugin is active, deactivate one of them and test again.
The button covers content on mobile
Move it to the opposite corner, choose a smaller style or use an inline Button block on important pages. Check it alongside your menu, cookie notice and checkout controls before keeping a floating layout site-wide.
FAQ
How do I add a WhatsApp button to my WordPress website?
Create a https://wa.me/ link with your full international number, then add it to a WordPress Button block or install a maintained WhatsApp chat plugin. Test the link on a phone and computer before publishing it across the site.
What is the correct WhatsApp link format for India?
Use https://wa.me/91XXXXXXXXXX, replacing the Xs with the mobile number. Use 91 instead of the leading 0, and do not include a plus sign, spaces, brackets or dashes.
Can I add a WhatsApp button without a plugin?
Yes. Add the wa.me URL to a WordPress Button block, or place a simple anchor link in a Custom HTML block. The Button block is easier for most beginners because it uses the theme’s existing styling.
How do I add a pre-filled WhatsApp message?
Add ?text= after the number and URL-encode the message. For example, spaces become %20; always test the final link so the visitor sees a short, editable message before sending it.
Can I track clicks on a WhatsApp button?
Yes, if your analytics tool records outbound link clicks. In GA4, enable Enhanced measurement and review outbound click events for the wa.me destination; this measures clicks from your website, not messages that were sent in WhatsApp.
DONE add-whatsapp-button-wordpress words=2291
Want to partner with us, suggest a resource or advertise on this blog? Email partnerships@hostkarle.in



