How to stop WordPress mobile links from forcing AMP URLs

When WordPress links behave differently on mobile and begin appending ?amp to URLs, the problem may be caused by an active AMP plugin rather than a theme breakpoint or hardcoded mobile redirect.

In one staging-to-production project, mobile visitors were being sent to AMP versions of pages whenever the site detected a smaller viewport. The development review confirmed that an AMP plugin was active on staging and was responsible for the forced ?amp behavior. Once the plugin was deactivated, normal mobile URLs returned immediately.

Issue background

A WordPress staging site showed unexpected behavior on mobile devices: links were opening with an ?amp query parameter appended to the URL, effectively forcing visitors into an AMP version of the page.

The behavior appeared to be tied to mobile breakpoints, with smaller viewport widths triggering the alternate URLs. Because the site was being prepared for a staging-to-production push, the main concern was whether the same forced mobile behavior would carry over to the live site.

At first, it was not clear whether the cause was a plugin, legacy code, or another mobile-specific redirect system.

Diagnosis

The developer reviewed the staging environment and found that an AMP plugin was active there.

That plugin was responsible for opening AMP versions of pages and adding the ?amp query parameter to mobile links. After it was disabled, the forced mobile URL behavior stopped.

The production site also contained the AMP plugin, but it was already inactive. That detail was important because it meant the problematic behavior was specific to the staging configuration rather than a required part of the live WordPress setup.

The source task does not document a separate hardcoded redirect, theme-level mobile redirect, or breakpoint script as the cause. The confirmed root cause was the active AMP plugin on staging.

Resolution steps

A practical troubleshooting process for WordPress mobile links that unexpectedly append ?amp is:

  1. Reproduce the behavior on a mobile viewport. Confirm that the URL actually changes when the site is viewed at smaller screen widths or on a mobile device.
  2. Look for an active AMP plugin. Review the WordPress Plugins screen and identify whether an AMP-related plugin is enabled.
  3. Compare staging and production plugin states. A plugin may exist on both environments but be active on only one. That difference can explain why the problem appears in staging but not on the live site.
  4. Temporarily deactivate the AMP plugin. Disable it on staging and retest the same mobile links.
  5. Confirm the ?amp query parameter disappears. In this case, deactivating the plugin immediately stopped the forced AMP URLs.
  6. Verify the production configuration before deployment. Confirm that the AMP plugin is not active on the live site if AMP behavior is not part of the intended experience.
  7. Proceed with the staging-to-production push only after the plugin state is correct. This prevents the staging environment from introducing unwanted mobile behavior during deployment.

The key diagnostic lesson is to compare environment configuration before assuming the site contains custom redirect code. A plugin that is active on staging but inactive on production can make the two environments behave very differently even when the theme and page content are otherwise identical.

Final outcome

The forced mobile behavior was resolved by deactivating the AMP plugin on the staging site. Mobile links stopped appending ?amp, and the normal versions of pages opened instead.

The same plugin was present on production but already inactive, so the developer confirmed that the corrected staging configuration could be promoted without carrying the forced AMP behavior into the live site.

If your WordPress site is forcing AMP URLs, adding ?amp on mobile, or behaving differently between staging and production, contact Freshy. Our WordPress team can help diagnose plugin state, mobile redirects, AMP behavior, and staging-to-production configuration issues.