Running Main Domain on WordPress via Subdomain?

7 replies
Hi,

Im stuck and have been going through hell the last few days.

One of my clients has a shared hosting account. It has the main domain and a bunch of Addon Domains (other sites).

The main domain was build with DreamWeaver.
We want to change it to WordPress.


Ive already built the new WP site in a subdomain of the maindomain.
eg. h!!p://newsite.maindomain.com

My plan was to use my backupcreator plugin to clone the site and move it into a new install of WP on the main domain public_html.

The plugin always works fine when restoring in an Addon Domain. However, when I installed it on the new main domain, it failed and ERASED all the AddonDomain folders!!!!! I restored all the AddonDomains (It took hours and hours). Tried the Wp public_html restore again and.... yep, it messed everything up again!

The backupcreator file doesnt seem to be the problem as I tested the file on another subdomain and it restored perfectly. The problem seems to be installing on the public_html folder.

Backupcreator support is not helping. They are cold and seem as though they could care less that their plugin messed up all the sites on my hosting account. Im still trying to deal with them but it seems useless.

SO - Im on my own I guess. hence this post.

MY "Plan B" OPTION I need help with:

I tried researching how to run the WP Main Domain on public_html from a subdomain. But it doesnt seem to work 100%.

The home page shows the correct home URL rather than the Subdomain. HOWEVER, all the inner pages show the subfolder urls. ex htp;;subdomain.maindomain.com/page1

I dont want any of the subdomain url's to show. I want all the pages to show as the Main Domain URL's. ex. htp;;www.maindomain.com/page1


If anyone can please help me to figure out how to run the Main Domain on WP from a SubDomain I would be forever thankful.


All Ive been able to find is instructions that tell me to change the WPurl and DomainUrl in the General Settings. Than copy the index.php and .htaccess file to the root folder and add a tweak to the index.php code. However, I get the results I mentioned above.

Thanks
AJ
#domain #main #running #subdomain #wordpress
  • Profile picture of the author Mkj
    Not sure I understand this? You want to run a wp site from a subdomain yet it should appear that it is the main domain? Or am I right in thinking you want to move your wp installation from the subdomain to the main domain root?
    {{ DiscussionBoard.errors[7316987].message }}
    • Profile picture of the author AcidJazz
      Originally Posted by Mkj View Post

      Not sure I understand this? You want to run a wp site from a subdomain yet it should appear that it is the main domain? Or am I right in thinking you want to move your wp installation from the subdomain to the main domain root?
      You are correct on both parts.

      I tried the second way and it didnt end well.

      So, Im hoping to find out how to do things the first way you mentioned.

      At the end of the day. I need to turn the subdomain into the main domain on the root public_html directory.

      Thanks
      {{ DiscussionBoard.errors[7317015].message }}
      • Profile picture of the author Mkj
        Originally Posted by AcidJazz View Post

        You are correct on both parts.

        I tried the second way and it didnt end well.

        So, Im hoping to find out how to do things the first way you mentioned.

        At the end of the day. I need to turn the subdomain into the main domain on the root public_html directory.

        Thanks
        What happened when you did the latter - moved your site from sub to main?
        {{ DiscussionBoard.errors[7317047].message }}
        • Profile picture of the author AcidJazz
          Originally Posted by Mkj View Post

          What happened when you did the latter - moved your site from sub to main?
          WP installed fine on the public_html root folder. The problem is when I tried to clone/restore via the backupcreator plugin, it failed and deleted all the Addon Domains. Not pretty!

          So if backupcreator support wont help me, I have to figure out how to run the subdomain as the maindomain.

          Thanks
          {{ DiscussionBoard.errors[7317497].message }}
          • Profile picture of the author Mkj
            Originally Posted by AcidJazz View Post

            WP installed fine on the public_html root folder. The problem is when I tried to clone/restore via the backupcreator plugin, it failed and deleted all the Addon Domains. Not pretty!

            So if backupcreator support wont help me, I have to figure out how to run the subdomain as the maindomain.

            Thanks
            To be honest I have no idea what backupcreator is or what it can do. If you are moving wp from a sub to a main then maybe this post will help. I don't envy you. Just make sure you backup all the files that are on the main domain incase of any problems. I made this reply to another problem earlier:

            I have carried this out loads of times. It can get complicated when you are using a cms say like wordpress but other packages can be similar.

            If your site displays the ip address and not the new domain name on first load (once the domain has propagated) then look to the htaccess file. If that is all that is wrong then ok if not read on.

            When I purchase a new domain for instance it becomes active instantly off my domain provider but if I point that to a site say where I have moved everything over from another directory on my server along with a copy of the database it was using in loads of cases the site will still display the old domain settings on lots of links.

            As has been mentioned these settings are stored in the database mainly, though cache directories might need emptying too along with config or setup files altering.

            How I get around the database problem is to download it and then carry out a search and replace for the old domain (ip in your case) with new domain name (resaving it as another name and keeping the original safe). In packages like wordpress there can be loads of these especially if you have installed a lot of plugins. Once I alter it I will upload it again thereby removing all instances of the old domain setup.

            Some wordpress plugins will also need checking as these can create their own settings files, especially ones to do with redirecting.
            {{ DiscussionBoard.errors[7317511].message }}
            • Profile picture of the author AcidJazz
              Thanks for your post but no, it's not what Im looking for.

              Forget about backupcreator.

              I just want to run the subdomain as the maindomain. From within the same hosting account. And I need the urls to NOT have the subfolder in them.

              Thanks
              {{ DiscussionBoard.errors[7317540].message }}
              • Profile picture of the author Mkj
                Originally Posted by AcidJazz View Post

                Thanks for your post but no, it's not what Im looking for.

                Forget about backupcreator.

                I just want to run the subdomain as the maindomain. From within the same hosting account. And I need the urls to NOT have the subfolder in them.

                Thanks
                To be honest that is sure a weird need. Thinking about it I would probably do this:

                1. Install the wordpress in a subdomain.
                2. Alter all the database settings and anything else in the wordpress setup so that all the urls point to the main domain (see previous post)
                3. Use htaccess redirect on the main domain so that everything points to the subdomain.

                Code:
                Options +FollowSymLinks
                RewriteEngine on
                RewriteRule (.*) http://subdomain here/$1 [R=301,L]
                You will still have the problem of subdomain urls pointing to your new main domain but internal links will rectify that once they click on something.

                If all you were doing was moving a domain from the root to a directory I could understand that easily but what you are asking is confusing to say the least.

                UPDATE
                To be honest the above just doesn't make a lot of sense. All you have to do is remove the main domain files and transfer the subdomain wordpress over to it and then carry out all the changes I have outlined in the above post. This will run the transfered wordpress with the correct domain title and urls then.
                {{ DiscussionBoard.errors[7317591].message }}

Trending Topics