Introduction to InLinks Wordpress Sync Plugin
What is the InLinks Wordpress Sync Plugin?
The InLinks Wordpress Sync plugin, developed by Brett Tabke of Pubcon, is a WordPress plugin designed to enhance your site's SEO by integrating with the InLinks service. It automatically fetches and applies internal linking, schema markup, heading optimizations, and broken link fixes to your WordPress posts, streamlining content optimization directly within your site.
(Be sure to check the FAQ file for common questions and the current readme.txt for updated changelog.)
How It Works
The plugin operates by:
- Fetching Data: It retrieves JSON data from InLinks' servers (e.g.,
https://jscloud.net/x/{project_id}/{flattened_url}.json) based on your InLinks Project ID and post URLs. - Caching Data: JSON data is cached in
wp-content/uploads/inlinks-cacheto reduce API calls, with a configurable cache duration (default: 60 minutes). - Content Injection: The plugin modifies post content in real-time, updating paragraphs, list items, headings (h1, h2), titles, meta tags, and replacing broken links as specified in the JSON data. It also injects schema markup (JSON-LD) and handles redirects.
- Settings and Debugging: A settings page allows you to enable/disable syncing, set the Project ID, enable logging, and manage cache duration. Debug tools include cache clearing, update checks, and log viewing.
- Automatic Setup: On fresh installs, it detects the InLinks JavaScript tag on your homepage to auto-set the Project ID, and warns you to remove the tag to avoid conflicts.
Note: The plugin requires a valid InLinks Project ID and write permissions for the cache directory. It checks for updates and caching plugins on activation to ensure smooth operation.
Check the current readme.txt for more information and updated changelog.
Installation
How to Install the InLinks Wordpress Sync Plugin
The InLinks Sync plugin can be installed on your WordPress site to fetch and apply internal linking, schema, heading, and broken link data from the InLinks service. Below are the steps to install the plugin either through the WordPress admin dashboard or manually via a ZIP file.
Prerequisites:
- A WordPress site running version 5.0 or higher.
- Administrator access to the WordPress dashboard.
- Write permissions for the
wp-content/uploadsdirectory to store cached JSON files and logs. - An InLinks account with a valid Project ID (found in your InLinks embed script, e.g.,
). - Internet access for fetching JSON data from
jscloud.netand checking for plugin updates.
Option 1: Install via WordPress Plugin Directory
- Log in to your WordPress admin dashboard.
- Navigate to Plugins > Add New in the left-hand menu.
- In the search bar, type InLinks Sync.
- Locate the "InLinks Sync" plugin by Brett Tabke of Pubcon. If not available in the directory, proceed to Option 2 (manual installation).
- Click Install Now next to the plugin.
- Once installed, click Activate to enable the plugin.
- After activation, you'll be redirected to the InLinks Sync settings page (Settings > InLinks Sync) to configure the plugin.
Option 2: Manual Installation via ZIP File
- Download the plugin ZIP file from https://www.phdss.com/inlinks/inlinks-wp-sync.zip.
- Log in to your WordPress admin dashboard.
- Navigate to Plugins > Add New in the left-hand menu.
- Click the Upload Plugin button at the top of the page.
- Choose the downloaded
inlinks-wp-sync.zipfile and click Install Now. - After installation, click Activate to enable the plugin.
- After activation, go to Settings > InLinks Sync in the admin menu to configure the plugin.
Post-Installation Steps:
- Enter your InLinks Project ID in the settings page (found in your InLinks embed script). If the plugin detects the InLinks JavaScript tag on your homepage and the Project ID is 0, it will automatically set it for you.
- Ensure the
wp-content/uploadsdirectory is writable for caching JSON files and logs. - Remove the InLinks JavaScript tag (e.g.,
) from your site to avoid conflicts, as prompted by the settings page. - Optionally, enable logging in the settings to troubleshoot any issues.
Note: After installation, the plugin checks for updates and detects caching plugins, displaying notices if necessary. Review the settings page for any warnings about caching plugins or the InLinks JavaScript tag.
Each option available on the InLinks Sync plugin settings page (version 0.9.8. The settings control how the plugin interacts with the InLinks service to fetch and apply internal linking, schema, heading, and broken link data to your WordPress posts.
Caching Issues and What to Expect
Description: Many WordPress sites use caching plugins or server-side caching (like NGINX FastCGI, W3Cache, WP Rocket, or Varnish) to speed up page load times. While this improves performance, it can delay or block the effects of the InLinks plugin from appearing right away.
- Schema Injection: InLinks schema (JSON-LD) is only injected when the page is generated on the server. If a cache plugin is serving a pre-generated version of the page, the updated schema won't appear until the cache expires or is manually cleared.
- Content Modifications: The plugin modifies titles, meta tags, headings, and internal links dynamically. These changes won't be visible on cached pages until they are regenerated.
- What Users Will See: Visitors may still see outdated or missing schema and links until the page cache expires. This is normal when full-page caching is in effect.
- Recommendations: After installing or updating the plugin, consider clearing your site cache (via your caching plugin or host) to force pages to regenerate with InLinks data.
- Cache-Aware Behavior: The plugin detects caching plugins and shows a notice if one is active. You can dismiss the warning, but it serves as a reminder that plugin output depends on uncached page generation.
Note: If you're troubleshooting and not seeing expected changes, clearing your cache is the first thing to try.
Settings
Enable InLinks Syncing
Type: Checkbox
Default: Enabled (checked)
Description: This option globally enables or disables the InLinks Sync functionality. When checked, the plugin fetches JSON data from InLinks, injects it into your posts (e.g., modifying content, titles, meta tags, or adding schema), and handles redirections as specified. When unchecked, all InLinks-related features are disabled, and no data is fetched or applied to your posts.
Impact: Disabling this setting stops all interactions with the InLinks service, preventing any content modifications or API calls. This can be useful for troubleshooting or temporarily pausing InLinks integration without deactivating the plugin.
Note: If disabled, features like the "InLinks Data" link in post/page lists and data fetching will not function.
InLinks Project ID
Type: Numeric Input
Default: 0
Description: This field specifies your InLinks Project ID, which is found in your InLinks embed script (e.g., <script defer src="https://jscloud.net/x/xxxxx/inlinks.js">, where XXXXX is the Project ID). The plugin uses this ID to construct URLs for fetching JSON data from https://jscloud.net/x/{project_id}/{flattened_url}.json.
Impact: A valid Project ID is required for the plugin to fetch data. If set to 0 or an invalid value, data fetching will fail. If the plugin detects an InLinks JavaScript tag on your homepage and the Project ID is 0 (e.g., after a fresh install), it automatically sets this field to the detected ID and notifies you.
Note: Ensure this ID matches your InLinks project to avoid fetching incorrect data. If the JavaScript tag is detected, you'll be prompted to remove it to prevent conflicts.
Enable Logging
Type: Checkbox
Default: Disabled (unchecked)
Description: When enabled, the plugin logs all API activity, responses, and errors to a debug file located at wp-content/uploads/inlinks-debug.log. This includes details about JSON fetches, content modifications, update checks, and JavaScript detection.
Impact: Enabling logging helps troubleshoot issues by providing detailed logs. The log file is capped at 3MB, with older entries truncated to 1MB when exceeded. Disabling logging prevents file creation and reduces server I/O.
Note: Use this for debugging, as continuous logging may impact performance on high-traffic sites. The log can be viewed or cleared in the "Debug / Tests" section.
JSON Cache Max Age (minutes)
Type: Numeric Input
Default: 60 minutes
Description: This setting defines how long (in minutes) the plugin caches InLinks JSON files in the wp-content/uploads/inlinks-cache directory before fetching fresh data from the InLinks service. Cached files are stored per post, named after the post slug (e.g., post-slug.json).
Impact: A shorter cache age ensures fresher data but increases API calls to InLinks, potentially impacting performance. A longer cache age reduces API calls but may delay updates. The minimum value is 1 minute.
Note: Caching is bypassed when manually refreshing data for a post or clearing the cache. Ensure your server has write permissions for the cache directory.
Debug / Tests
Delete JSON Cache
Type: Button
Description: This button deletes all cached JSON files in the wp-content/uploads/inlinks-cache directory. It displays the current number of cached files and their total size (in KB).
Impact: Clearing the cache forces the plugin to fetch fresh InLinks data on the next page load, which can be useful if data is outdated or corrupted. A confirmation prompt prevents accidental deletion.
Note: After clearing, the plugin will show a notice indicating success (with the number of files deleted) or if no files were found.
Check for Update
Type: Button
Description: This button checks for plugin updates by fetching the latest version from https://www.phdss.com/inlinks/version.txt. The current plugin version (0.9.73) is displayed alongside.
Impact: If a newer version is available, a notice and an "Update to Version X" button appear. Clicking this initiates the update process, downloading from https://www.phdss.com/inlinks/inlinks-wp-sync.zip. A success or failure notice is shown after the attempt.
Note: Requires internet access and sufficient permissions. Check the debug log if the update fails.
View Log / Clear Log
Type: Buttons (visible only if Enable Logging is checked)
Description: The "View Log" button displays the contents of wp-content/uploads/inlinks-debug.log in a readonly textarea. The "Clear Log" button empties the log file. The current log file size is shown.
Impact: Viewing the log helps diagnose issues with data fetching, content injection, or updates. Clearing the log resets it to zero bytes, useful for starting fresh during troubleshooting.
Note: These options are only available when logging is enabled. A confirmation prompt prevents accidental log clearing.
Warnings and Notices
The settings page may display notices based on certain conditions:
- Settings Saved: A success notice appears after saving settings.
- Cache Write Test: A success or error notice appears after saving settings, indicating whether the plugin can write to the cache directory.
- Cache Clear: A notice confirms the number of JSON cache files deleted, or indicates if none were found or deletion failed.
- Update Status: A notice shows whether a plugin update succeeded or failed.
- Auto-Set Project ID: If the InLinks JavaScript tag is detected and the Project ID is 0, a notice confirms the ID was automatically set.
- InLinks JavaScript Detected: A warning notice appears if the InLinks JavaScript tag is found on the homepage, advising removal to avoid conflicts. It includes a dismiss link.
- Caching Plugins Detected: A warning notice lists detected caching plugins (e.g., WP Rocket) that may affect functionality, with a dismiss link.
