Extra questions regarding replacing existing site with site developed in a subdomain


#1

First of all, if you are looking for a guide about how to replace your existing site with site developed in a subdomain, have a look at this excellent thread. Another good piece of advice can be found here.

Here I ask a couple of questions directly related to the information above. When following the steps above (while attempting to replace my existing site (say, domainB.com, now using Joomla!) with a site developed in an unrelated subdomain (say, test.domainA.com, using Wordpress)

I asked these questions first as a reply to the first link posted, but realized they might find a better home in their own thread. Here follows an updated version of these questions:

My questions concern the change from CMS (Joomla to wordpress), while keeping the same URL. Unfortunately I have not created my new (temporary address) website in a sub domain, but rather on a test domain. so this is my first question:

1] Are the steps above also valid for moving between two unrelated URLs (say, from test.domainA.com to domainB.com)

My next question concerns the use of the dreamhost webFTP. I used that since it came recommended, but probably I did not do it right. In step 2 and 3 I need to rename the relevant folders (move domainB.com to domainB.com.old, then create a new clean folder “domainB.com”, and one-click-install WP in the folder. When I tried that I received an error saying “Joomla! has already been installed at http://www.domainB.com”. I got around this by removing the joomla installation in domainB.com via the user panel.

2] Is there a better way of doing this? And why did I receive the error when following the steps described above?

When following step 6 (changing the URL in the WP dashbord of the old site (test.domainA.com), I changed both fields (the wordpress address and the site address). This resulted in a then dysfunctional old website. In the end what I did was first following step 7 (renaming the old directory (test.domainA.com) to the new directory (domainB.com). Afterward I edited the wp-config file by adding the following lines:

define(‘WP_HOME’,‘http://www.domainB.com’);
define(‘WP_SITEURL’,‘http://www.domainB.com’);

3] Did I mess up step 6? Should I only have changed wp OR site address? And is the hard coding both addresses via wp-config going to bite me in the ass later on?

4] I already have a blog installed in domainB.com/blog/ (wordpress). Can I copy/paste this onto test.domainA.com/blog/ and will it then survive the move to domainB.com/blog/?

I look forward to a reply, and hope these questions are not extremely trivial (actually, despite my ego, i do!). I did search the forums here for answers but could not find a direct answer. Thanks you for your time.


#2

Are you asking how to move WP from place1 to place2 ? (with more words).


#3

Hi sXi,

yes, but with a catch. I have a website up and running on domainB.com, which is build with Joomla!. I would like to switch my CSM to wordpress, and have rebuild my site (almost from the roots up) on test.domainA.com.

Now I would like to make the switch. I.e. while keeping downtime of my website (domainB.com) minimal, replace my joomla directory with the wordpress directory. This is treated in another thread (which I reference on the top of my post), but I was left with some questions. Hence this post.


#4

Okay, what you’re trying to do is far easier than most people make it out to be, and in your case it’s going to be even easier because you’re at DreamHost where everything is easier :slight_smile:

If I understand correctly, J! is still operating on the target domain and it will be completely replaced with the new WordPress site.

Are both the test sub-domain and the target main domain on the same user account?

Does the test site still work correctly at your test sub-domain?

Can we consider the test site redundant (deletable) after the switch?


#5

What can I say. I have a talent for making things complicated :slight_smile:

Yes, J! is still operating on the target domain and will be replaced.
Yes, both domains are on the same user account
Yes, the test site works properly
Yes (but), the test site (which will be moved to the new site) is redundant after the switch. Ideally I would like to keep it at the test domain so I can use it for development issues for the same site, but worst case scenario I can export the ‘new’ wp site into a new test environment.

I assume “all yes” means I am not over complicating this time. Do you have a magically simple answer to my 4 questions?
(and then there is the question of how to move the /blog/)

Thanks a lot!


#6

Was the /blog/ part on the target site created on another WP or is it using something else?

I mention this because WP is actually a blog platform rather than a CMS (they frankenstein’d it).


#7

The /blog/ part was created with a “one-click-install” wordpress install, so at least I got that right :slight_smile:


#8

You could probably use that “/blog/ part” and just alter it a bit so it’s now your main site.

Had you considered and ruled out such an approach?


#9

Hi sXi,

actually, I did I think (see my original post). Can yo help me with my questions?


#10

Okay, so moving WordPress is moving WordPress is moving WordPress :slight_smile: The first time you do it, it’s weird, and after that it’s sort of easy.

If you want to change domainB.com from Joomla to WP, I would do the simplest thing, and install WP in domainB.com/blog/ (like you did), set it all up there, and when ready, use the trick of keeping WP in it’s own folder, while letting it use the main domain’s URL. It involves the least amount of work on my part.

Since you’ve already built out in test.domainA.com, the best way about it is to, as you did, build it out and then change the home and site URLs in the WP Admin. This will break your site and that’s okay. :slight_smile: Then you copy over all the files and the database, and it will suddenly work. (It breaks because you have not yet done the copy).

[quote] In the end what I did was first following step 7 (renaming the old directory (test.domainA.com) to the new directory (domainB.com). Afterward I edited the wp-config file by adding the following lines:

define(‘WP_HOME’,‘http://www.domainB.com’);
define(‘WP_SITEURL’,‘http://www.domainB.com’);
[/quote]

That was correct, though really not needed. Once you renamed the directory, it should have come up, since domainB is what you changed the home/site URLs to before.

That is confusing… Why would you want to move it to DomainA and then BACK to DomainB? If it’s in /blog/, leave it alone and it’s okay, unless you also want THAT to be WP and it’s not today.

Though per your email, there’s been a lot of work done, so if you want to restate where you are today, what’s where, and where you want to be, that may help :slight_smile:


#11

Thank you so much your time.

One more question first. During the step where (after moving domainB to domainB.old using the dreamhost webFTP) I install a “1-click-install” on domainB to trick Dreamhost into realizing there is (going to be) a wordpress install there. That doesn’t work if I follow the steps outlines in the posts I reference (I get warned there is already (still) a joomla install at domainB). What I do now it remove the joomla application from domainB via the dreamhost panel. Can you confirm that I am NOT deleting anything essential from my old site that was moved to domainB.old?

As to my /blog/ question: I installed it (might not have been the smartest move) as a subdomain of domainB in domainB/blog/. So, if I move domainB do domainB.old, the blog gets moved to domainB.old/blog/. I hope to get away with copy/pasting the complete /blog/ directory to test.domainA.com/blog, which, after the move will be domainB.com/blog/. Does that make sense?

Once I complete the move I will get back to this thread and reply to all my question myself.

Thanks!


#12

Ah, okay, if you did a 1-click, then the ONLY way to ‘move’ things around is to actually move WP. You’d have to copy all the files from test.domainA.com on top of domainB.com, and then you’d also have to bring the DB over (though maybe not since if they’re all on one account here on DH, I would still change the SQL from mysql.domainb.com to mysql.domainA.com)

Go to https://panel.dreamhost.com/index.cgi?tree=goodies.installer, click on MANAGE, and the expand Joomla on that list. Click on ‘Remove from list’ (NOT delete all files :wink: I bet you can tell why), and it’ll go away. That will NOT delete any files at all, it just removes the install from your list. Is that what you wanted?

For /blog/, just copy it back to domainB.com so it’s in domainB.com/blog/ - Since you didn’t mess with the URLs, it’ll magically re-appear :slight_smile:


#13

Ok, now I hope I am starting to cut through my own confusion. All domains that I have been talking about are 1-click’s.
If I follow my steps as outlines above, remove the joomla! install from the list of applications installed on “domainB”, re-install a 1-click WP, rename the newly created directory into domainB.nevereverneeded, and rename the test.domainA.com directory into domainB.com, I should be a happy camper afterwards, no?

Can I then leave my databases alone (first timer here, those things scare me if they are connected to a domain that has taken 1000+ hours of work)?

All the good karma in the world to you. You might wanna buy a lottery ticket tomorrow :slight_smile:


#14

I have just moved my site, and thought I’d give a small summary for future reference:

what I did:

[list=1]
[]Using FTP: move siteB.com to joomla.siteB.com
[
]Using FTP: move siteB.com to joomla.siteB.com via dreamhost control panel: remove joomla 1-click install from siteB.com (just from the list, not the files), and re-install a wordpress 1-click install on siteB.com. Afterwards move this new install to wp.siteB.com
[]Now, in the admin panel of test.siteA.com, change all URLs from “test.siteA.com” to “siteB.com”. Use e.g. te velvet blues plugin mentioned before.
[
]In the same admin area, change (under general --> settings") both the WordPress Address (URL) and Site Address (URL) into http://www.siteB.com. Save. (your site will now be “broken”. This is no problem)
[]Using FTP: rename your test.siteA.com directory into siteB.com
[
]Try logging in at siteB.com/wp-admin
[*]Instant happiness!
[/list]

That’s all. It is not the most elegant solution, and your databases remain somewhat tangled up (any improvement suggestions?), but it works.

ps: If you use wp super cache and you change your site the way I did, you need to edit the wp-config.php file in your root directory to adjust the wp cache directory

pps, For peace of mind, you might want to run a broken link check on your website. I used the (free) http://www.brokenlinkcheck.com, but I am sure there are many, many other equally viable options available.

ppps: any hard coded URLs in widgets need to be manually updated if the point to test.siteA.com.