The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Technical SEO Issues
    4. Redirect from old wordpress site to new php site? Best approach

    Redirect from old wordpress site to new php site? Best approach

    Technical SEO Issues
    7 4 844
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ocelot
      ocelot last edited by

      Hi

      I have two websites one legacy site done in wordpress the other in php.  However I would like to merge the two together and remove the wordpress site.

      However it has a good link profile and the pages rank well.

      What is the best approach to do a 301 redirect from the old site with all its pages pointing to the homepage of the new site?

      If so what's the best way to do this in wordpress?

      Many thanks

      1 Reply Last reply Reply Quote 0
      • edwardlewis
        edwardlewis last edited by

        redirect the pages in the .htaccess file.

        rather than redirect them all to the homepage, you should redirect them to the most relevant page on the other site.

        why are you getting rid of one site?

        ocelot 1 Reply Last reply Reply Quote 0
        • Naghirniac
          Naghirniac last edited by

          Ian,

          You will need to do the follow:

          1) Search pages indexed by google

          You will need to do the 301 redirection only for the pages that google already indexed. To discovery then you need to google "site:www.example.com", where example.com is your website

          2) Create the .htaccess file

          Inside of the .htaccess file you will need to include:

          RewriteEngine On RewriteCond %{HTTP_HOST} ^example.com RewriteRule (.*) http://www.example.com/$1 [R=301,L]

          _redirect 301 /old.html http://www.example.com/new.html_

          The first part is to avoid duplicated content from www.example.com and example.com. The line redirect 301 you will need to write for each page you need a redirection (founded at step 1). That's all.

          1 Reply Last reply Reply Quote 0
          • Vahe.Arabian
            Vahe.Arabian last edited by

            Hi Ian,

            Edward has started on the right step in terms

            Ian I wouldn't say cms is too important as hosting and server details, because hosting & server is what limits your ability to migrate the website.

            Check out this recent article - http://www.seomoz.org/blog/web-site-migration-guide-tips-for-seos  and go to the URL mapping section to get a comprehensive step by step guide. Focus on your best pages.

            Naghirniac, rather than searching pages indexed by google, it would be better to use a site crawler like Xenu or screaming frog as it will find all duplicate and 404 pages for you.

            Good luck,

            V

            ocelot 1 Reply Last reply Reply Quote 0
            • ocelot
              ocelot @Vahe.Arabian last edited by

              Can this be done?

              on each page indexed?

              Are there not any Wordpress plugins that would do this without delving into the htaccess file?

              In your example you mention the code below, how would I change what I have below to redirect from my mydomain.co.uk site to point at the correct site mydomain.com site

              And on the redirect 301 lines, how would I redirect - what would the code need to be?

              www.mydomain.co.uk/sample to www.mydomain.com/newsamplepage.php

              Vahe.Arabian 1 Reply Last reply Reply Quote 0
              • ocelot
                ocelot @edwardlewis last edited by

                Basically because there were too sites in tandem and when the business areas merged there is only a need for one site.

                I am struggling with the best way to achieve this as described in my post at the bottom of this thread

                1 Reply Last reply Reply Quote 0
                • Vahe.Arabian
                  Vahe.Arabian @ocelot last edited by

                  Ian

                  • Meta refreshes should never be replaced with 301's, they are actual much worse than a 302 redirect.
                  • There are a few redirects you can find - http://www.aowaa.com/5-wordpress-301-redirect-plugin/ and http://wordpress.org/extend/plugins/simple-301-redirects/. The disadvantage I find with using plugins is that they extremely slow down your site.
                  • For doing 301 redirects it's entirely up to the server your site is hosted on.
                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post
                  • Moving site from html to Wordpress site: Should I port all old pages and redirect?
                    Linda-Vassily
                    Linda-Vassily
                    0
                    2
                    56

                  • Site address change: new site isn't showing up in Google, old site is gone.
                    GlobeRunner
                    GlobeRunner
                    0
                    5
                    107

                  • Redirecting old html site to new wordpress site
                    briandee
                    briandee
                    0
                    3
                    326

                  • Best practice for eCommerce site migration, should I 301 redirect or match URLs on new site
                    Jinx14678
                    Jinx14678
                    0
                    4
                    1.2k

                  • Merged old wordpress site to new theme and have crazy amount of 4xx and duplicate content that wasn't there before?
                    entourage212
                    entourage212
                    0
                    2
                    400

                  • Need some help with an old wordpress site we just merged with a new template
                    Jolora
                    Jolora
                    0
                    4
                    425

                  • Redirecting a old aged site to a new exact match site?
                    jmueller
                    jmueller
                    1
                    6
                    534

                  Get started with Moz Pro!

                  Unlock the power of advanced SEO tools and data-driven insights.

                  Start my free trial
                  Products
                  • Moz Pro
                  • Moz Local
                  • Moz API
                  • Moz Data
                  • STAT
                  • Product Updates
                  Moz Solutions
                  • SMB Solutions
                  • Agency Solutions
                  • Enterprise Solutions
                  • Digital Marketers
                  Free SEO Tools
                  • Domain Authority Checker
                  • Link Explorer
                  • Keyword Explorer
                  • Competitive Research
                  • Brand Authority Checker
                  • Local Citation Checker
                  • MozBar Extension
                  • MozCast
                  Resources
                  • Blog
                  • SEO Learning Center
                  • Help Hub
                  • Beginner's Guide to SEO
                  • How-to Guides
                  • Moz Academy
                  • API Docs
                  About Moz
                  • About
                  • Team
                  • Careers
                  • Contact
                  Why Moz
                  • Case Studies
                  • Testimonials
                  Get Involved
                  • Become an Affiliate
                  • MozCon
                  • Webinars
                  • Practical Marketer Series
                  • MozPod
                  Connect with us

                  Contact the Help team

                  Join our newsletter
                  Moz logo
                  © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                  • Accessibility
                  • Terms of Use
                  • Privacy