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. Web Design
    4. Wordpress in a subdirectory?

    Wordpress in a subdirectory?

    Web Design
    5 4 3.0k
    • 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.
    • GregDixson
      GregDixson last edited by

      Hi, I've used this method a few times of developing Wordpress websites in a subdirectory and only moving the index.php file to root when the site is ready to launch. (full details of how this is done in the link below)

      The sites I've used this on all index correctly and rank for their terms, so I haven't seen any negatives at all. However moving forward I would like to know for sure if this is indeed SEO-friendly?

      note: The site functions as any other at www.domain.com, it's only the Wordpress install & admin etc. resides at: www.domain.com/wordpress/ -the pages are served to root ie. www.domain.com/about)

      Details.. WordPress from a subdirectory to the root directory:

      http://askwpgirl.com/how-do-i-move-wordpress-from-a-subdirectory-to-the-root-directory/

      thanks in advance.

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

        Having worked quite a bit with WordPress (since version 1.2) I can't think of an SEO reason why this would cause a problem.

        The only potential gotcha that comes to mind is that I'm not sure how well WordPress' one-click updater feature is going to work when WP has been spread amongst multiple directories.

        1 Reply Last reply Reply Quote 1
        • Guest
          Guest last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • Marcus_Miller
            Marcus_Miller last edited by

            Hey, I have been working like this for years and my own site uses this approach. However, I have come across a few premium themes and a smaller amount of plugins when it can cause a few problems, usually these are things you can easily hack in the source but it may break things when you update your theme and you have to hack again (yoothemes always have this bug).

            So, I tend to keep sites in the root now if possible just to simplify things as much as possible.

            Moving the site to a different URL / Directory is a pretty simple process:

            1. Move all of the relevant files

            2. Run the following queries in PHPMyAdmin (or whatever DB tool you use)

            **UPDATE wp_options SET option_value = replace(option_value, 'OLDSITE', 'NEWSITE') WHERE option_name = 'home' OR option_name = 'siteurl';

            UPDATE wp_posts SET guid = replace(guid, 'OLDSITE','NEWSITE');

            UPDATE wp_posts SET post_content = replace(post_content, 'OLDSITE', 'NEWSITE');

            UPDATE wp_postmeta SET meta_value = replace(meta_value, 'OLDSITE', 'NEWSITE');**

            • URLs are full paths without a trailing slash so

            OLDSITE = http://www.url.com/subdir

            NEWSITE = http://www.url.com


            Obviously, back up the DB and test the water first but I have used this SQL a bunch of times (even in the last week) to move sites from one server to another (testing to live) or to even move sites from a sub directory to the root. Or, even to move sites from a sub directory on a testing server to the root on the live space.

            So, it is not an essential change by any means but in the spirit of keeping things as simple and straightforward as possible, the root tends to work a little better in my experience.

            Hope that helps! 
            Marcus

            GregDixson 1 Reply Last reply Reply Quote 1
            • GregDixson
              GregDixson @Marcus_Miller last edited by

              Thanks for your reply Marcus, and also for the details for moving to root. That may come in handy, and anyone else who stumbles across this thread too.

              It's good to know there appear to be no issues for SEO in Wordpress residing in a subdirectory, yet I am appreciating more and more the need to keep things as simple and straight forward as possible.

              Greg

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              • CMS Alternatives to WordPress
                Vijay-Gaur
                Vijay-Gaur
                1
                8
                161

              • WordPress and Redirects
                evolvingSEO
                evolvingSEO
                0
                14
                149

              • About wordpress database
                godreamvacations
                godreamvacations
                0
                2
                102

              • Switching over to wordpress
                evolvingSEO
                evolvingSEO
                0
                5
                129

              • Blog on Subdomain or Subdirectory?
                SteveWebb
                SteveWebb
                0
                4
                378

              • Migrating a site to Wordpress
                Jon-C
                Jon-C
                0
                6
                233

              • .htaccess on wordpress multisites
                Matt-Williamson
                Matt-Williamson
                0
                11
                1.2k

              • Wordpress templates
                Doc_Sheldon
                Doc_Sheldon
                0
                9
                1.1k

              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