ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Solved WordPress Cutover Main Page Works, but Secondary Pages Do Not

    IT Discussion
    wordpress cloudflare nginx varnish apache php ubuntu linux ubuntu 19.04
    8
    19
    1.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ObsolesceO
      Obsolesce @scottalanmiller
      last edited by

      @scottalanmiller said in WordPress Cutover Main Page Works, but Secondary Pages Do Not:

      BANGING HEAD ON DESK

      It's an Ubuntu-ism. On Fedora this is not needed. On Ubuntu you have to...

      a2enmod rewrite
      

      What's that?

      1 scottalanmillerS 2 Replies Last reply Reply Quote 0
      • 1
        1337
        last edited by 1337

        You should look at the mod_rewrite rules. It's pretty obvious that the problem lies with the url rewriting.

        Either the reverse proxy is wrongly configured or the apache webserver.

        Actually it's probably best to follow the entire chain. Remember that you can active the rewrite modules logging as well.

        A small thing like using a different directory will make the rewrite rules invalid.

        1 Reply Last reply Reply Quote 0
        • 1
          1337 @Obsolesce
          last edited by

          @Obsolesce said in WordPress Cutover Main Page Works, but Secondary Pages Do Not:

          @scottalanmiller said in WordPress Cutover Main Page Works, but Secondary Pages Do Not:

          BANGING HEAD ON DESK

          It's an Ubuntu-ism. On Fedora this is not needed. On Ubuntu you have to...

          a2enmod rewrite
          

          What's that?

          That's a script that enables the mod_rewrite module in apache - apache2 enable module.

          1 Reply Last reply Reply Quote 2
          • scottalanmillerS
            scottalanmiller @Obsolesce
            last edited by

            @Obsolesce said in WordPress Cutover Main Page Works, but Secondary Pages Do Not:

            @scottalanmiller said in WordPress Cutover Main Page Works, but Secondary Pages Do Not:

            BANGING HEAD ON DESK

            It's an Ubuntu-ism. On Fedora this is not needed. On Ubuntu you have to...

            a2enmod rewrite
            

            What's that?

            It's what enables rewrite to work at all.

            1 Reply Last reply Reply Quote 1
            • Emad RE
              Emad R @scottalanmiller
              last edited by Emad R

              @scottalanmiller

              Ok ensure .htaccess file is present and has good permission

              try chmod something open to the docroot and chown like www-data:www-data for whole docroot just for test

              Use wordpress cli to change the site URL home and URL address to the correct values after site move
              define( 'WP_HOME', 'http://example.com' );
              define( 'WP_SITEURL', 'http://example.com' )

              You can use the portable phar
              https://gist.github.com/pcsontos/122fceb3d6e6e43da98d
              wp-cli.phar option update home 'http://example.com'
              wp-cli.phar option update siteurl 'http://example.com'

              1 Reply Last reply Reply Quote 0
              • 1
                1337 @scottalanmiller
                last edited by

                @scottalanmiller said in WordPress Cutover Main Page Works, but Secondary Pages Do Not:

                BANGING HEAD ON DESK

                It's an Ubuntu-ism. On Fedora this is not needed. On Ubuntu you have to...

                a2enmod rewrite
                

                Ah, so the problem was just that the mod_rewrite module wasn't enabled in Apache.

                It's the LoadModule entries in the httpd.conf file that tells Apache which modules to load. Using a2enmod is mostly for convenience.

                scottalanmillerS 1 Reply Last reply Reply Quote 0
                • travisdh1T
                  travisdh1 @scottalanmiller
                  last edited by

                  @scottalanmiller said in WordPress Cutover Main Page Works, but Secondary Pages Do Not:

                  BANGING HEAD ON DESK

                  It's an Ubuntu-ism. On Fedora this is not needed. On Ubuntu you have to...

                  a2enmod rewrite
                  

                  Gotta love those Ubuntu-isms that exist just to slow us down. You all know how much I like Ubuntu.

                  dbeatoD 1 Reply Last reply Reply Quote 0
                  • scottalanmillerS
                    scottalanmiller @1337
                    last edited by

                    @Pete-S said in WordPress Cutover Main Page Works, but Secondary Pages Do Not:

                    @scottalanmiller said in WordPress Cutover Main Page Works, but Secondary Pages Do Not:

                    BANGING HEAD ON DESK

                    It's an Ubuntu-ism. On Fedora this is not needed. On Ubuntu you have to...

                    a2enmod rewrite
                    

                    Ah, so the problem was just that the mod_rewrite module wasn't enabled in Apache.

                    It's the LoadModule entries in the httpd.conf file that tells Apache which modules to load. Using a2enmod is mostly for convenience.

                    Right, coming from doing this in Fedora regularly, it didn't occur to me that there was a manual step as Fedora defaults to turning that on.

                    1 Reply Last reply Reply Quote 0
                    • dbeatoD
                      dbeato @travisdh1
                      last edited by

                      @travisdh1 said in WordPress Cutover Main Page Works, but Secondary Pages Do Not:

                      @scottalanmiller said in WordPress Cutover Main Page Works, but Secondary Pages Do Not:

                      BANGING HEAD ON DESK

                      It's an Ubuntu-ism. On Fedora this is not needed. On Ubuntu you have to...

                      a2enmod rewrite
                      

                      Gotta love those Ubuntu-isms that exist just to slow us down. You all know how much I like Ubuntu.

                      We know 😉 but hey I know it 😛

                      1 Reply Last reply Reply Quote 1
                      • CloudKnightC
                        CloudKnight
                        last edited by

                        Well let's talk about fedora and updating killing a laptop lol....

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post