MeshrBeta
Self-Hosted WordPress Integration

Self-Hosted WordPress Documentation

Everything you need to integrate Meshr with your self-hosted WordPress site using the native REST API

Plugin vs No Plugin

This guide covers connecting to self-hosted WordPress using the native WordPress REST API without requiring the Meshr plugin. If you prefer to use our WordPress plugin for additional features, check out our WordPress plugin documentation.

Quick Start

REST API Connection

  1. Ensure your WordPress site has REST API enabled (default in WordPress 4.7+)
  2. Create an Application Password in WordPress admin
  3. Log in to your Meshr dashboard
  4. Click "Add Website" and select WordPress as your platform
  5. Enter your WordPress site URL (e.g., https://mysite.com)
  6. Enter your WordPress username and Application Password
  7. Meshr will test the connection using the WordPress REST API
  8. Once connected, Meshr will discover your site and start analyzing

Setting Up Application Passwords

WordPress Application Passwords (available in WordPress 5.6+) provide a secure way to authenticate API requests without using your main account password.

Step-by-Step Guide

  1. Log in to your WordPress admin dashboard
  2. Navigate to Users → Your Profile (or Users → All Users → Edit for a specific user)
  3. Scroll down to the "Application Passwords" section
  4. If you don't see this section, your WordPress version may be below 5.6 - consider updating
  5. Enter a name for this password (e.g., "Meshr Integration")
  6. Click "Add New Application Password"
  7. A new application password will be generated (format: xxxx xxxx xxxx xxxx xxxx xxxx)
  8. Important: Copy both the username and password immediately - you won't be able to see the password again!
  9. Save these credentials securely

Note: If Application Passwords are not available, you may need to update WordPress to version 5.6 or higher, or use a plugin that enables this feature.

WordPress REST API

Meshr uses the native WordPress REST API to interact with your self-hosted WordPress site. The REST API is built into WordPress (since version 4.7) and doesn't require any additional plugins.

API Endpoints Used

Site Discovery

GET /wp-json/wp/v2

Retrieves site information and available endpoints

User Authentication

GET /wp-json/wp/v2/users/me

Validates credentials and retrieves user information

Posts & Pages

GET /wp-json/wp/v2/posts
GET /wp-json/wp/v2/pages

Retrieves posts and pages for analysis

Updating Content

POST /wp-json/wp/v2/posts/{id}
POST /wp-json/wp/v2/pages/{id}

Updates posts and pages with internal links (requires authentication)

Authentication Method

Basic Authentication

Meshr uses HTTP Basic Authentication with your WordPress username and Application Password:

Authorization: Basic base64(username:application_password)

This is sent with every API request to authenticate and authorize actions on your WordPress site.

Security Note: Application Passwords are more secure than using your regular WordPress password because they can be revoked individually and have limited scope.

Connecting to Meshr

Once you have your Application Password, connect your WordPress site to Meshr:

  1. Log in to your Meshr dashboard
  2. Click "Add Website" and select WordPress as your platform
  3. Enter your WordPress site URL (e.g., https://mysite.com or https://www.mysite.com)
  4. Enter your WordPress username (the one associated with the Application Password)
  5. Enter the Application Password you created (not your regular WordPress password)
  6. Click "Connect" to test the connection
  7. Meshr will use the WordPress REST API to validate credentials and discover your site
  8. Once connected, Meshr will begin analyzing your posts and pages

Requirements

WordPress Version

  • ✅ WordPress 5.6+ (for Application Passwords)
  • ✅ WordPress 4.7+ (for REST API - older versions need plugin)
  • ✅ REST API enabled (enabled by default)

Permissions

  • ✅ Admin or Editor user role
  • ✅ Application Password created
  • ✅ REST API accessible
  • ✅ No security plugins blocking API

Compatibility

Supported Content

  • ✅ Blog posts
  • ✅ Pages
  • ✅ Custom post types
  • ✅ Custom fields

SEO Plugins

  • ✅ Yoast SEO
  • ✅ RankMath
  • ✅ AllInOne SEO
  • ✅ All major SEO plugins

Security Considerations

Best Practices

  • Always use Application Passwords instead of your main WordPress password
  • Store Application Passwords securely - you can't view them again after creation
  • Use HTTPS for your WordPress site to encrypt API communications
  • Revoke Application Passwords immediately if you suspect they've been compromised
  • Create a dedicated WordPress user with Editor or Admin role for Meshr if desired

Troubleshooting

Common Issues

Application Passwords section not visible

Ensure you're using WordPress 5.6 or higher. If you're on an older version, update WordPress or use the Meshr plugin instead.

Connection fails with 401 Unauthorized

Verify that you're using the Application Password (not your regular WordPress password) and that the username is correct. Make sure there are no extra spaces in the password.

REST API not accessible

Check if any security plugins are blocking the REST API. Test by visiting https://yoursite.com/wp-json in your browser - you should see JSON output.

SSL/HTTPS errors

Ensure your WordPress site uses HTTPS. If you're using a self-signed certificate, it may cause connection issues. Consider using a valid SSL certificate (Let's Encrypt offers free certificates).

Cannot update posts

Verify that the user associated with the Application Password has Editor or Administrator permissions. Contributor or Author roles may not have sufficient permissions.

Reconnecting your site

If you need to reconnect, go to your Meshr dashboard, disconnect the existing connection, and reconnect with your updated credentials. You may need to create a new Application Password if the old one was revoked.

Ready to Transform Your Internal Linking Strategy?

Free 7-day trial • Cancel anytime

Join websites that have increased organic traffic by 32% with Meshr's platform-agnostic internal linking tool.

Works with websites, Webflow & WordPress
Semantic AI-powered suggestions
Enterprise-grade security & support