Title: Ask url problem before using this plugin
Last modified: January 13, 2021

---

# Ask url problem before using this plugin

 *  Resolved [ady0651](https://wordpress.org/support/users/ady0651/)
 * (@ady0651)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/ask-url-problem-before-using-this-plugin/)
 * Hello dear want to ask.
 * Previously I used another AMP plugin with the url suffix /amp/
 * And because currently the theme I use has better AMP support, I want to replace
   it in this official AMP plugin.
 * If I switch to the official AMP plugin, will there be 404 on the previous page
   or post?
 * Because in the previous plugin the back url ends in /amp/ while the official 
   AMP ends in ?Amp.
 * Or now there is a solution to keep the url /amp/ in the official AMP plugin
 * I ask before migrating to this plugin, so that there is no decrease in traffic
   or unexpected errors.
 * Please answer.

Viewing 15 replies - 1 through 15 (of 15 total)

 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/ask-url-problem-before-using-this-plugin/#post-13900077)
 * I’m currently working on adding the ability to use `/amp/` across all URLs on
   the site: [https://github.com/ampproject/amp-wp/pull/5558](https://github.com/ampproject/amp-wp/pull/5558)
 * This will be part of the 2.1 release.
 * If you’re willing to test a pre-release version of the plugin, you can try the
   production build `amp.zip` linked to from here: [https://github.com/ampproject/amp-wp/pull/5558#issuecomment-725867606](https://github.com/ampproject/amp-wp/pull/5558#issuecomment-725867606)
 *  Thread Starter [ady0651](https://wordpress.org/support/users/ady0651/)
 * (@ady0651)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/ask-url-problem-before-using-this-plugin/#post-13900147)
 * Ok that’s very good. Oh yes I have another question.
 * In the upcoming AMP plugins that you tell me about.
 * I am trying to understand it and there are 4 url ​​structures attached.
 * So the question is, why is a definition written ?Amp=1 recommendation.
 * do I keep the / amp / switch to the recommendation ?amp=1 ?
 * Because when I got it down I saw that the url could switch all / amp / so that
   404 doesn’t happen.
 * How do you think about it? thx.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/ask-url-problem-before-using-this-plugin/#post-13900235)
 * If you are starting out from scratch then `?amp=1` is recommended because such
   URLs will continue to work even when the AMP plugin is deactivated.
 * Since you previously had `/amp/` then you can choose the path suffix instead.
 * Nevertheless, even if you go ahead with `?amp=1` you’ll find that it won’t result
   in 404s: the plugin will automatically redirect to `?amp=1` when a 404 occurs.
 *  Thread Starter [ady0651](https://wordpress.org/support/users/ady0651/)
 * (@ady0651)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/ask-url-problem-before-using-this-plugin/#post-13900242)
 * Sir, please recommend me still confused.
 * If I follow the recommendation ?Amp=1, will it not affect the google SERP that
   has been indexed?
 * If it works that means I have to stick to the url /amp/.
 * If it doesn’t matter, of course I will follow the recommendation ?Amp=1 right?
 * Because it is a good step in the future related to development, it is feared 
   that nothing will happen if I continue to follow url /amp/.
 *  Thread Starter [ady0651](https://wordpress.org/support/users/ady0651/)
 * (@ady0651)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/ask-url-problem-before-using-this-plugin/#post-13900325)
 * oh yes sir
 * In this official AMP plugin, use 1200px image to make it valid.
 * What is the solution when I use this plugin because most of the images are 1024px
   and 900px and some even 750px.
 * Because in the AMP plugin that I use, there are no problems with the Google search
   console.
 * Is this also a solution without changing all images to 1200px? thx for his help.
   I am waiting for the next answer.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/ask-url-problem-before-using-this-plugin/#post-13900586)
 * If the structure of the AMP URL changes, you may see then AMP results disappear
   from search results for a few days until they get re-indexed. That’s the only
   known issue with changing the structure of AMP URLs.
 * Please open a new support topic regarding images, as that is unrelated to the
   URL structure.
 *  Thread Starter [ady0651](https://wordpress.org/support/users/ady0651/)
 * (@ady0651)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/ask-url-problem-before-using-this-plugin/#post-13900600)
 * ok thx for the answer maybe it’s better to use url / amp / first.
 * I will open the topic again and close this topic.
 *  [Mr Lucky](https://wordpress.org/support/users/voodoochill/)
 * (@voodoochill)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/ask-url-problem-before-using-this-plugin/#post-13901497)
 * > If the structure of the AMP URL changes, you may see then AMP results disappear
   > from search results for a few days until they get re-indexed.
 * I am still seeing some incoming links with /amp/ from previous plugin after many
   months, ie it has not been dropped as expected after deactivating that plugin.
 * I would like to use this new official plugin and going forward it seems to make
   sense to use the ?amp=1 URL instead of the old /amp as this seems to now be standard.
 * So do you (or anyone) know how I would htaccess redirect all the old url/amp 
   to the new ?amp=1
 * Thanks
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/ask-url-problem-before-using-this-plugin/#post-13909003)
 * [@voodoochill](https://wordpress.org/support/users/voodoochill/) I suggest trying
   the new paired URL structures
 * If you try the pre-release production build of the plugin linked to above: [https://github.com/ampproject/amp-wp/pull/5558#issuecomment-725867606](https://github.com/ampproject/amp-wp/pull/5558#issuecomment-725867606)
 * When that is active, you’ll be able to decide between `/amp/` and `?amp=1` via
   the new Paired URL Structure section on the AMP settings screen. If you decide
   to go with `?amp=1` then the plugin will automatically redirect `/amp/` to `?
   amp=1` and there is no need for any `.htaccess` redirect.
    -  This reply was modified 5 years, 4 months ago by [Weston Ruter](https://wordpress.org/support/users/westonruter/).
 *  [mbandqs](https://wordpress.org/support/users/mbandqs/)
 * (@mbandqs)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/ask-url-problem-before-using-this-plugin/#post-13912113)
 * I tried to setup with the production build but it is giving me error
    Uncaught
   Error: Call to a member function using_permalinks() on null in PairedRouting.
   php:567.
 * I too need home page & custom post to render with /amp/ and not ?amp. Is there
   any hack for now unless new plugin is out?
 *  [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/ask-url-problem-before-using-this-plugin/#post-13912201)
 * [@mbandqs](https://wordpress.org/support/users/mbandqs/) If you’d like to open
   a [new support topic](https://wordpress.org/support/plugin/amp/#new-post) we’d
   be happy to assist with your case individually.
 * Please include all relevant information to your support topic, including your
   Site Health Information if relevant. You can share [using this form](https://docs.google.com/forms/d/1JTQmphDlk9YgHpDoFRbHXpkDqv8-QmzTT7MDR4AstyQ)
   after opening a support topic.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/ask-url-problem-before-using-this-plugin/#post-13913942)
 * > I tried to setup with the production build but it is giving me error
   >  Uncaught
   > Error: Call to a member function using_permalinks() on null in PairedRouting.
   > php:567.
 * [@mbandqs](https://wordpress.org/support/users/mbandqs/) While opening a new 
   support topic would be best, while waiting for it to be opened, can you provide
   more details on how you triggered this error? I am not seeing that issue. I can
   switch to the path suffix structure and save without an error:
 * ![](https://i0.wp.com/cldup.com/0apN5arlrq.png?ssl=1)
 * If I turn off pretty permalinks in the General > Settings screen, the non-query
   var options are disabled as expected:
 * ![](https://i0.wp.com/cldup.com/hUWnauedMW.png?ssl=1)
 *  [mbandqs](https://wordpress.org/support/users/mbandqs/)
 * (@mbandqs)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/ask-url-problem-before-using-this-plugin/#post-13920059)
 * [@westonruter](https://wordpress.org/support/users/westonruter/) below is more
   details
 *  PHP Fatal error: Uncaught Error: Call to a member function using_permalinks()
   on null in sitename\\\\htdocs\\wp-content\\plugins\\amp\\src\\PairedRouting.php:
   567\nStack trace:\n#0 sitename\htdocs\\wp-includes\\class-wp-hook.php(286): AmpProject\\
   AmpWP\\PairedRouting->filter_default_options(Array, Array)\n#1 sitename\htdocs\\
   wp-includes\\plugin.php(208): WP_Hook->apply_filters(Array, Array)\n#2 sitename\
   htdocs\\wp-content\\plugins\\amp\\includes\\options\\class-amp-options-manager.
   php(166): apply_filters(‘amp_default_opt…’, Array, Array)\n#3 sitename\\\\htdocs\\
   wp-content\\plugins\\amp\\includes\\options\\class-amp-options-manager.php(299):
   AMP_Options_Manager::get_options()\n#4 sitename\\\\htdocs\\wp-content\\plugins\\
   amp\\includes\\amp-helper-functions.php(301): AMP_Options_Manager::get_option(‘
   theme_support’)\n#5 sitename\\\\htdocs\\wp-content\\plugins\\amp\\src\\PairedRout
   in sitename\\htdocs\\wp-content\\plugins\\amp\\src\\PairedRouting.php on line
   567
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/ask-url-problem-before-using-this-plugin/#post-13920064)
 * For readability:
 *     ```
       PHP Fatal error: Uncaught Error: Call to a member function using_permalinks() on null in sitename\htdocs\wp-content\plugins\amp\src\PairedRouting.php:567
       Stack trace:
       #0 sitename\htdocs\wp-includes\class-wp-hook.php(286): AmpProject\AmpWP\PairedRouting->filter_default_options(Array, Array)
       #1 sitename\htdocs\wp-includes\plugin.php(208): WP_Hook->apply_filters(Array, Array)
       #2 sitename\htdocs\wp-content\plugins\amp\includes\options\class-amp-options-manager.php(166): apply_filters(‘amp_default_opt…’, Array, Array)
       #3 sitename\htdocs\wp-content\plugins\amp\includes\options\class-amp-options-manager.php(299): AMP_Options_Manager::get_options()
       #4 sitename\htdocs\wp-content\plugins\amp\includes\amp-helper-functions.php(301): AMP_Options_Manager::get_option(‘theme_support’)
       #5 sitename\htdocs\wp-content\plugins\amp\src\PairedRout in sitename\htdocs\wp-content\plugins\amp\src\PairedRouting.php on line 567
       ```
   
 * [@mbandqs](https://wordpress.org/support/users/mbandqs/) where is this showing
   up for you? Does the error happen on the frontend or on the settings screen?
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/ask-url-problem-before-using-this-plugin/#post-13920118)
 * For whatever reason, the `$wp_rewrite` variable is not defined when that code
   is running on your site. That doesn’t really make sense since this variable is
   defined by WordPress [extremely early](https://github.com/WordPress/wordpress-develop/blob/5582e4965cebfe6418b7a3e6534066f794e3912a/src/wp-settings.php#L459)
   in the execution. Nevertheless, I’ve just pushed up a [change](https://github.com/ampproject/amp-wp/pull/5558/commits/ec6dc1dea0c1a97b9f26facce2442df5f1653e80)
   to the pull request which eliminates reliance on checking `$wp_rewrite->using_permalinks()`
   in favor of just looking at the `permalink_structure` option, which is what that
   method is ultimately doing anyway.
 * Please test the latest **production build** ZIP linked to in this pull request
   comment (as seen in the screenshot below): [https://github.com/ampproject/amp-wp/pull/5558#issuecomment-725867606](https://github.com/ampproject/amp-wp/pull/5558#issuecomment-725867606)
 * ![](https://i0.wp.com/cldup.com/OI-nmjBvBZ.png?ssl=1)
 * Upon installation, this will show up as having the version `2.1.0-alpha-20210118T043558Z-
   4abbb9b`.
    -  This reply was modified 5 years, 4 months ago by [Weston Ruter](https://wordpress.org/support/users/westonruter/).
    -  This reply was modified 5 years, 4 months ago by [Weston Ruter](https://wordpress.org/support/users/westonruter/).

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Ask url problem before using this plugin’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

## Tags

 * [url](https://wordpress.org/support/topic-tag/url/)

 * 15 replies
 * 5 participants
 * Last reply from: [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/ask-url-problem-before-using-this-plugin/#post-13920118)
 * Status: resolved