Technology Tools for Ministry

Community

Web-Empowered Church User Community
All Categories > Getting Started > Hosting > Migrate WEC Installation
Total Posts: 11 - Pages (2): [1] 2
user picture Author: Henry Pleas
Posted: Jul 25 2007 - 06:29 AM
Subject: Migrate WEC Installation
Hi,

I need to move a current development website to its permanent home. I'll be using the same host provider, but a different domain and account. The host provider is Godaddy.

Is there any advice about best practice for doing this successfully? I thought I had seen some longer threads on this topic, but now can't find them now? Seems there would be a couple more steps other than moving the database, and moving the files to the new location.

Are there extensions that might help with the process?

Thanks for any recommendations...

Henry
Author: Jeff Segars
Posted: Jul 25 2007 - 10:00 AM
Subject: re: Migrate WEC Installation
Henry,
Moving the database and files are really the main steps. There are a couple tweaks you'll need to do once those are moved though

To move the database, you can use a tool like PHPMyAdmin to create a SQL file with all your data in it. You can then use PHPMyAdmin on the new account to set up your database and import the data.

Once you move everything to your new account, you may need to do some tweaking of the database name and user / password. To do this, you can go to the Install tool at mysite.com/typo3/install/. Changing the database information should give you a working backend login. You'll then want to update the WEC Constant for site URL and clear the caches, which should get the frontend of your site working.

You might check with your hosting provider and see if they can do this move for you. They should be able to copy from one account to another, rather than the export, download, and upload steps that you'll have to go through.

Hope that helps!
Jeff
user picture Author: Henry Pleas
Posted: Jul 25 2007 - 11:45 AM
Subject: re: Migrate WEC Installation
Hi Jeff,

Thanks for your quick response.

Godaddy as a host provider uses a very specific pathing scheme for their virtual hosting environments to resolve the root paths to their servers. Maybe other providers do this also, I just don't know, but was really surprised and impressed that Typo3/WEC pretty much figured it out when I installed. I've had trouble with other applications.

I'm just wondering though whether that stuff will be imbedded in the database records when I go to the new account. I'm new to Typo3, and not hugely experienced with Unix so I'm not clear about how the PHP and constants hang together. When I look in the Tools->Configuration on the back end, for example, I find this.

[XCLASS]
[typo3/mod/web/perm/index.php]=/home/content/h/p/c/.../html/Dev/NCCProto/typo3conf/ext/be_acl/res/class.ux_sc_mod_web_perm_index.php
[ext/cms/layout/db_layout.php]=/home/content/h/p/c/.../html/Dev/NCCProto/typo3conf/ext/date2cal/class.ux_sc_db_layout.php
[typo3/class.alt_menu_functions.inc]=/home/content/h/p/c/.../html/Dev/NCCProto/typo3conf/ext/cl_becache/class.alt_menu_functions.inc
[typo3/alt_menu.php]=/home/content/h/p/c/.../html/Dev/NCCProto/typo3conf/ext/cl_becache/class.alt_menu.php
[t3lib/class.t3lib_tcemain.php]=/home/content/h/p/c/.../html/Dev/NCCProto/typo3conf/ext/moc_filemanager/res/class.ux_tcemain.php

This pathing has nothing to do with the public DNS record to the Domains, so I'm not clear how this gets changed. What appears after .../html/ in the example above is the "root" of my Domain. Right now I have the site I am moving in a subdirectory of one domain and it will go into the root of the new one. I have some concerns about this, but am even more concerned about this pathing that I have no control over. Do you know is the pathing thats indicated in these records as a result of a variable that get read in from the Unix environment?

I will have a relatively short window of time to make the move successfully, so I am trying to be prepared. Thanks for any additional thoughts you can offer

Henry
Author: John Seybert
Posted: Jul 26 2007 - 11:30 PM
Subject: re: Migrate WEC Installation
A small word (or two ) of warning: I just had my host move all my domains and sites to a new server (the old one was getting loaded up and slow) They said it would take 24 hours - that was 4 days ago! Actually the sites were moved within that timeframe, but it seems like they didn't bother to check functionality. I kept getting Internal Server Error 500. After prodding them a little, they removed my .htaccess files to make the sites work, and told me that mod_rewrite wasn't part of the support for the move. OK, but it worked on the last server! I checked, and mod_rewrite was installed. Then I come to find out that all the permissions on the folders were set to the default (755 I think), so I kept getting all sorts of errors anytime Typo3 needed to write to one of the folders. After changing the fileadmin, typo3conf, Typo3temp, and upload folders (and subfolders) to 777 as required, things started working a little better. I still haven't sorted out all the .htaccess issues, and I have some funny graphics resizing going on on my one site, but I'll post about those issues later if I can't resolve them (thank you in advance everyone )

Just thought you might want to be aware when you do the move.

Blessings and best of luck,

John
user picture Author: Henry Pleas
Posted: Jul 27 2007 - 04:31 AM
Subject: re: re: Migrate WEC Installation
Thanks John for this,

its a little depressing, but really helpful information

As a test I created a subdomain, that points to the subdirectory where I have this development website. This seemed a good model for actually moving the site to another location. After changing the site location in WECconfig to the subdomain name and clearing the caches, I can now get to the opening page, but not further into the tree structure. I get 500 Internal Server Errors. Also I cannot get to the Admin panel unless I use the old high level domain path instead of the subdomain name that I created. Here I also get 500 errors. The original path still works to get to the site, but again only to th first page, after that 500 errors.

One could ask why I have this development site in a subdirectory? I did this because I am using WEC at the root for my own site. Then I have a Dev subdirectory where I've put a couple of other installations of WEC that are in development. This seems like it should work and has, until I try to make any adjustment to the pathing. Makes me a little nervous about this process of moving the site to the new location.

The same version of .htaccess exists at both the actual root and the rootpath to this development site. This is what came out of the install package for WEC. Perhaps this is wrong, but I'm still not clear about how .htaccess should be changed to reflect rootpath to the nested site. I tried changing the .htaccess file in the rootpath for the development site once and this was a catastrophe. Not even the opening page was found, returning 500 errors. With the original in place the only problem that I have is that when page is not found I get the page not found template for my own site, not that for the site I am developing.

Anyone have some best practice guidelines about the specific changes that need to be made to WEC .htaccess (and which ones) as a site is moved from one location to another. I see a lot of posts talking about changing .htaccess, but not detailing how.

Thanks for any help,

Henry
Author: John Seybert
Posted: Jul 27 2007 - 06:32 PM
Subject: re: Migrate WEC Installation
Henry,

That sounds like the issue I had when the host renamed my .htaccess file to "fix" my sites. It would load the home page, but all other pages would not come up. Here is the .htaccess file I am using at the moment to get my sites up and running, although it doesn't have all the changes I had made to "tweak" it:


#####
#
# Example .htaccess file
#
# This file contains a collection of almost everything you will need
# for optimising TYPO3:
#
# - mod_rewrite (used for SimulateStaticDocuments, RealUrl, etc.)
# - PHP optimisation
#
# If you want to use it, you'll need to rename this file to '.htaccess'.
# (To make this work you will need to adjust the 'AllowOverride'
# directive in your Apache configuration file.)
#
# IMPORTANT: You may need to change this file depending on your TYPO3
# installation!
#
# You should change every occurance of TYPO3root/ to the location where you
# have your website in. For example:
# If you have your website located at http://mysite.com/
# then your TYPO3root/ is just empty (remove 'TYPO3root/')
# If you have your website located at http://mysite.com/some/path/
# then your TYPO3root/ is some/path/ (search and replace)
#
# If you have problems with this file, try using the minimal
# mod_rewrite.htaccess which is located in the typo3_src/misc/
# directory of this installation.
#
# You can also use this configuration in your httpd.conf, but you'll have
# to modify some lines, see the comments (search for 'httpd.conf')
#
# Using rewriting in your httpd.conf is much faster, btw.
#
# Questions about this file go to the matching Install mailing list,
# see http://typo3.org/documentation/mailing-lists/
#
####
### Begin: Rewrite stuff ###
# Enable URL rewriting
RewriteEngine On
# To assist in debugging rewriting, you could use these lines
# DON'T enable it for production!
# This will only work in httpd.conf, not in .htaccess files
#RewriteLog /var/log/apache/rewrite.log
#RewriteLogLevel 9
# If you use the RealUrl extension, then you'll have to enable the next line.
# You will have to change this path if your TYPO3 installation is located
# in a subdirectory of the website root.
#
# If you place this in httpd.conf, you cannot use this directive in any case!
#RewriteBase /
# Stop rewrite processing if we are in the typo3/ directory
# For httpd.conf, use this line instead of the next one:
# RewriteRule ^/TYPO3root/(typo3|typo3temp|typo3conf|t3lib|tslib|fileadmin|uploads|favicon.ico)/ - [L]
RewriteRule ^(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|favicon.ico)/ - [L]

# Redirect http://mysite/typo3 to http://mysite/typo3/index_re.php
# and stop the rewrite processing
# For httpd.conf, use this line instead of the next one:
# RewriteRule ^/TYPO3root/typo3$ /TYPO3root/typo3/index.php [L]
RewriteRule ^typo3$ typo3/index_re.php [L]
# If the file/symlink/directory does not exist => Redirect to index.php
# Important note: If you copy/paste this into httpd.conf instead
# of .htaccess you will need to add '%{DOCUMENT_ROOT}' left to each
# '%{REQUEST_FILENAME}' part.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
# Main URL rewriting.
# If you use Windows and SimulateStaticDocuments do not work, try adding a
# slash (/) right before 'index.php' below.
# The example shows how to rewrite only *.html and *.pdf files to index.php
# This may be helpful when using an extension that can generate PDF files
# on the fly.
# Example: RewriteRule .*.(html|pdf)$ index.php [L]
# For httpd.conf, use this line instead of the next one that has no '#':
# RewriteRule .* /TYPO3root/index.php [L]
# For use with the RealUrl extension, you might need to remove the
# RewriteBase directive somewhere above and use this line instead of the
# next one:
# RewriteRule .* /index.php [L]
RewriteRule .* index.php [L]
### End: Rewrite stuff ###

### Begin: PHP optimisation ###
# All features below are left to the default if you don't change this.
# Simply remove the comment marks if you want to use some/all of these
# settings
# The PHP developers recommend disabling this feature. Do that.
# It's deprecated and is likely to be unsupported in future versions of PHP.
#php_flag allow_call_time_pass_reference off
# TYPO3 works fine with register_globals turned off.
# This is highly recommended!
#php_flag register_globals off
# PHP may not declare the argv & argc variables (that would contain the GET
# information).
# TYPO3 doesn't need this, so just turn it off.
#php_flag register_argc_argv off
# Magic quotes for runtime-generated data (data from SQL, exec(), etc.)
#php_flag magic_quotes_gpc off
# Order in which PHP registers GET, POST, Cookie and Built-in variables
#php_value variables_order GPCS
### End: PHP optimisation ###
# Add your own rules here
# ...
#Increase Max Upload Filesize
php_value upload_max_filesize 10M


The only change is the "Increase Max Upload Filesize at the end, otherwise it should be the default that you have already tried. I'm not sure how the subdomain in the subdirectory will work. I posted here a while back with a similar situation in trying to create a separate site for our preschool, and Jeff was able to help (we ended up NOT using an actual subdomain, though).

As I get my sites back up and running, I will be adjusting my .htaccess, and once I get it all tweaked, I can post it here for an example for you. In the meantime, keep the faith!

John
Author: Jeff Segars
Posted: Jul 27 2007 - 07:02 PM
Subject: re: Migrate WEC Installation
Thanks for jumping in and helping here John. I'm still working on a full solution but here's my thinking so far....

In Henry's case, the issue is a little unique because its one WEC/TYPO3 install inside another. By default. the .htaccess looks to see if a URL exists. If it does, the file is returned but if it does not, a TYPO3 page or TYPO3-generated error page is returned. This gets complicated when there is one WEC/TYPO3 install inside another because the outer .htaccess file will usually win even when the inner .htaccess file should be used.

I haven't been able to test it yet, but one possible solution involved editing the .htaccess file for the main site. The line you would change is taken from what John posted above, and I think it will make the main .htaccess file stop if the URL is for the subdirectory.

CODE:
RewriteRule ^(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|favicon.ico[b]|mysubdir[/[b])/ - [L]


Hopefully that will do the trick
user picture Author: Henry Pleas
Posted: Jul 28 2007 - 10:10 AM
Subject: re: Migrate WEC Installation
Hi John & Jeff,

First, thanks to you both very much for your help in trying to work through this.

If I understand your suggestion Jeff, I would try the following line in my .htaccess file at the root of my domain
RewriteRule ^(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|favicon.ico[b]|/Dev/NCCProto/[b])/ - [L]

This goes in without causing Internal Server Errors to all calls to the domain as changes to this line have caused before. But it also seems to have no effect on my page not found problem or the problem of internal errors when I change to the subdomain name in WEC Config. I put this line in above the other similar RewriteRule without commenting out the original...is that correct?

My real goal is to simulate a move...the "Page not found" issue is not pressing. Thinking about it in this way here are some observations:

1. The internal server errors come when a RealURL path is used. I found this out by going to the backend and calling up an embedded page from there.

2. The backend "Show" function brings up the embedded page as my original installation path, plus a pageid, not RealURL name. In other words it uses the subdirectory path, not the subdomain specification that was created with my host provider and changed in WECConfig. This works fine for accessing the page.

3. If I then change this http address to be the subdomain listing instead of the original installation path, with the page id I get to the pages just fine without Internal server errors: eg. http://northfielducc.mediatestament.com/about_us/ does not work, but http://northfielducc.mediatestament.com/index.php?id=38 works fine.

This is the case clearing the cache and also if I clear cache and wait to test overnight.

The above suggests to me that the installation is holding still some information about the original installation path despite the update to the WECConfig for Site Path. Also I'm still not clear about how Typo3 is dealing with the rootpath information that seems to be in the database.

It may be that the only way to really test this is to setup a test migration environment, where I can experiment with what happens when I move this to the root of another account.

Thanks again for your thoughts and advice.

Henry
Author: Jeff Segars
Posted: Jul 30 2007 - 05:22 PM
Subject: re: Migrate WEC Installation
Henry,
Are you making some progress on this? I was just checking out your development site and things seem to be behaving better.

Thanks,
jeff
user picture Author: Henry Pleas
Posted: Aug 06 2007 - 02:12 AM
Subject: re: Migrate WEC Installation
Hi Christoph and Jeff,

Actually setting up Typo3 in a the subfolder has been very useful and works pretty well. My challenges seem to be in moving it after the fact and maybe this is what you are referring to, Christoph, when you say it is more trouble than its worth.

I have setup through Godaddy's administrative interface a subdomain pointing to this subfolder. This is what I was describing in the previous post. The installation is found, but some of the pathing information seems to get lost when I try to call up the pages by the realUrl names that have been established. I can accept this for now, but it does suggest that the process of moving the site is not just as simple as copying the database and files to the new root location. If that were the case then establishing the subdomain, and changing my site location constant to this new address should work just fine to find all the dynamic addresses that are a part of the typo3/WEC installation. Am I missing something?

I have no great need to work with .htaccess or mod_rewrite; only to get a workable plan for moving the site into place, when we are ready in couple of weeks. Other posts and feedback I have seen suggest that .htaccess is a factor and so we are exploring what is actually required.

I do appreciate the advice and sorry for not responding back till now, I was in the midst of traveling and access to the forum was difficult.

Henry


New Post to the Web-Empowered Church Community

Author: Christoph Koehler
Conference: Hosting
Thread: Migrate WEC Installation

Henry,

As you probably have already noticed, setting up TYPO3 in a subfolder creates more trouble than it's worth.
The following depends on whether you have cPanel or another account management software, I am not sure what godaddy gives you.
You should probably setup a subdomain that will use the subfolder of your root. It should not just redirect. Once you can reach that typo3 installation through your subdomain, things will be a lot easier.
As far as migration goes, it's pretty straightforward: Copy all the files, including .htaccess (or all hidden files for that matter), export the database from your old host and import it to your new with phpMyAdmin or similar. Then change the db username, password, and name if applicable from the Install Tool and the site url from WEC Config. That should do the trick!

Let me know if this was helpful at all. I really don't recommend messing with .htaccess files and such, mod_rewrite is a monster.

Christoph
Total Posts: 11 - Pages (2): [1] 2
You must login to post a message to this conference.