Forums / General Questions / Moving my site to another folder- help!

Moving my site to another folder- help!

Locked

Views: 4,873

Results 1 to 20 of 45
This thread is locked. New replies are disabled.
7 Jan 2009, 5:00 PM
#1
mw4kids avatar

mw4kids

Zen Follower

Join Date:
Oct 2008
Posts:
403
Plugin Contributions:
0

Moving my site to another folder- help!

Hi All,

I did a search on this but couldn't find any answers...hope someone can give me such direction. I am currently using 1.37 zencart.

I was advised by a forum leader that I may get higher ranking on my site if I were to move my current url www.thrift 4kids.com/hp_zencart (fyi, I put a space in between words so my site would not be indexed) to just www. thrift4kids.com.

But I'm having issues figuring it out...this is all new to me:

Here are my questions as I go down the list of the tutorial:

  1. **Determine the new foldername where your Zen Cart™ files will be running from

Go into Admin > Configuration > Sessions and change the Session Directory to reflect the new folder name. If you cannot do this, see the alternate approach in step 5 below**

on my site it lists:
Sessions

*Title Value Action
Session Directory **/tmp **

Session Directory
If sessions are file based, store them in this directory*.

Do I change tmp/ to www.thrift 4kids.com??

2. Move/Rename the folder. You may need to use your FTP program to do this.???

not sure what this means...under my control panel, I have FTP Manager which gives me link to my File Manager and FTP Service which requires me to contact my webhost to make 'resourses available'

3. Your /includes/configure.php and /admin/includes/configure.php files are used to point Zen Cart™ to the right folders. In those files, you need to update several entries to match the new path information:
DIR_WS_CATALOG
DIR_WS_HTTPS_CATALOG
DIR_FS_CATALOG
DIR_FS_SQL_CACHE
DIR_WS_ADMIN (in admin)
DIR_WS_HTTPS_ADMIN (in admin)
DIR_FS_ADMIN (in admin)

I currently have this in my files: includes/configure.php
define('DIR_WS_CATALOG', '/hp_zencart/'); define('DIR_WS_HTTPS_CATALOG', '/hp_zencart/');
define('DIR_FS_CATALOG', '/hsphere/local/home/mwelch/thrift4kids.com/hp_zencart/');
define('DIR_FS_SQL_CACHE', '"/hsphere/local/home/mwelch/thrift4kids.com/hp_zencart/cache');?>

Do I change to:
define('DIR_WS_CATALOG', '/'); define('DIR_WS_HTTPS_CATALOG', '/');
define('DIR_FS_CATALOG', '/hsphere/local/home/mwelch/thrift4kids.com/');
define('DIR_FS_SQL_CACHE', '"/hsphere/local/home/mwelch/thrift4kids.com/cache');?>

and under this file: admin/includes/configure.php
define('DIR_WS_ADMIN', '/hp_zencart/admin/');
define('DIR_WS_CATALOG', '/hp_zencart/');
define('DIR_WS_HTTPS_ADMIN', '/hp_zencart/admin/');
define('DIR_WS_HTTPS_CATALOG', '/hp_zencart/');
define('DIR_FS_ADMIN', '/hsphere/local/home/mwelch/thrift4kids.com/hp_zencart/admin/');
define('DIR_FS_CATALOG', '/hsphere/local/home/mwelch/thrift4kids.com/hp_zencart/');
define('DIR_FS_SQL_CACHE', '/hsphere/local/home/mwelch/thrift4kids.com/hp_zencart/cache');

As well as this file (not listed under the categories to change in the tutorial:
define('DIR_FS_FILE_MANAGER_ROOT', '/hsphere/local/home/mwelch/thrift4kids.com/hp_zencart/');

do I change to:

define('DIR_WS_ADMIN', '/');
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_ADMIN', '/admin/');
define('DIR_WS_HTTPS_CATALOG', '/');
define('DIR_FS_ADMIN', '/hsphere/local/home/mwelch/thrift4kids.com/admin/');
define('DIR_FS_CATALOG', '/hsphere/local/home/mwelch/thrift4kids.com/');
define('DIR_FS_SQL_CACHE', '/hsphere/local/home/mwelch/thrift4kids.com/cache');

As well as this file (not listed under the categories to change in the tutorial:
define('DIR_FS_FILE_MANAGER_ROOT', '/hsphere/local/home/mwelch/thrift4kids.com/');

Your help with this would be greatly appreciated!

7 Jan 2009, 5:42 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Moving my site to another folder- help!

I'd use the Fix Cache Key utility mentioned in step 5 to manage the sessions thing.

Other than that, just move all the folders and files to the root of your site and edit the two configure.php files as you've noted. Should work.

7 Jan 2009, 6:33 PM
#3
mw4kids avatar

mw4kids

Zen Follower

Join Date:
Oct 2008
Posts:
403
Plugin Contributions:
0

Re: Moving my site to another folder- help!

thanks stevesh! But just to clarify...i upload the 'fix cache key' to my file manager, FIRST and then make changes to my configure.php files? Or is it the other way around?

sorry for the silly question, it's my first time and don't want to screw it up :blush:

7 Jan 2009, 6:42 PM
#4
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Moving my site to another folder- help!

This post may help you:

http://www.zen-cart.com/forum/showpost.php?p=665541&postcount=3

(In this post, the user's sub-directory was called zen - yours is called hp_zencart.

And YES - you run FIX CACHE after you've changed the configure.php files.

7 Jan 2009, 7:21 PM
#5
mw4kids avatar

mw4kids

Zen Follower

Join Date:
Oct 2008
Posts:
403
Plugin Contributions:
0

Re: Moving my site to another folder- help!

thanks!! just a couple of more questions...i promise.

when you say:

  1. COPY the directories and files over to the root - do you mean just the configure.php files mentioned in the tutorial or ALL files (and if all, whats the best way to copy and move them all)

and

  1. What exactly is considered the root directory?
    Is it the first page you see when you open your cpanel? In my case it looks like this:

file:/ - dir(s):3 | file(s):1
logs root:root
stats mxxxx:mxxxx
thrift4kids.com mxxxx:mxxxx

or do i click onto logs or thrift4kids.com to get to it? :unsure:

thanks again!!

7 Jan 2009, 7:28 PM
#6
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Moving my site to another folder- help!

you copy everything to your root folder .. not just configure.php files.

your root folder is the folder assigned to you by your hosting company .

in your case it should be thrift4kids.com
you better off using FTP program . if you are using Firefox , you can get fireFTP extension .. is great free ftp program added directly to you firefox browser.

7 Jan 2009, 7:32 PM
#7
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Moving my site to another folder- help!

If you are using the proprietary C-Panel (as opposed to a Control Panel interface that your host has devised), then you will see a small icon called "File Manager".

If you click that icon, it will take you to another screen, showing all your folders/directories as little yellow folder icons down the left-hand side. At this level, if you can see a little yellow folder icon called "hp_zencart", then you are in your ROOT directory.

The root is the top-most level at which you can add web-page files and folders to your website.

Please refer to that post I directed you to. In that post, it describes typical names for root directories.

If you are unfamiliar with the process of copying files under C-Panel, it's advisable to either ask your host to do it or seek professional help.

Send me a Private Message if you feel you require such assistance.

7 Jan 2009, 7:43 PM
#8
mw4kids avatar

mw4kids

Zen Follower

Join Date:
Oct 2008
Posts:
403
Plugin Contributions:
0

Re: Moving my site to another folder- help!

I will look at it some more...if I can't figure it out, I will definitely let you know.

thanks all!!!

7 Jan 2009, 9:05 PM
#9
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Moving my site to another folder- help!

If you have any search engine indexing of your current pages, you will want to redirect them to the new location so you don't lose anything. See Forwarding from old shop to new?, especially post 22.

8 Jan 2009, 10:46 PM
#10
mw4kids avatar

mw4kids

Zen Follower

Join Date:
Oct 2008
Posts:
403
Plugin Contributions:
0

Re: Moving my site to another folder- help!

Hi Again,

My hosting company was able to copy my files to my root, but their response was this:

I've copied your zen cart files to your root directory. The root directory is thrift4kids.com and hp_zencart is a subdirectory of the thrift4kids.com root directory. You can see now that thrift4kids.com loads the site without going to hp_zencart but once you click on a link it will then go to the hp_zencart directory since that is how the store was installed and all of the paths were set up to go to the hp_zencart subdirectory.

My question is, can I still do as previously discussed without causing issues, i.e. changing my configure.php files or should I just leave it be?

Thanks!

8 Jan 2009, 10:58 PM
#11
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Moving my site to another folder- help!

change your path in both configure.php files.
right now with this configuration , you have two zencart working , once you have setup everything with your new installation , you may want to remove the subdirectory all together..

8 Jan 2009, 11:36 PM
#12
mw4kids avatar

mw4kids

Zen Follower

Join Date:
Oct 2008
Posts:
403
Plugin Contributions:
0

Re: Moving my site to another folder- help!

thanks Tony_sar! Just a quick question: if I currently have two stores running right now...does making changes to one automatically makes changes to other? Is that why I can delete the old hp_zencart folder once I know all the 'new' copied files are working properly?

8 Jan 2009, 11:53 PM
#13
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Moving my site to another folder- help!

No.. your zencart determines path to your store and admin section through information ( paths ) contained in both configure.php files.
currently both configure.php files are identical , thats why in new store , clicking on any link you are directed to old store.

once you correct the path to your new store location then you don't need the old store that is in your subdirectory ..

9 Jan 2009, 12:04 AM
#14
mw4kids avatar

mw4kids

Zen Follower

Join Date:
Oct 2008
Posts:
403
Plugin Contributions:
0

Re: Moving my site to another folder- help!

got it....thanks so much!

9 Jan 2009, 8:31 AM
#15
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Moving my site to another folder- help!

Bear in mind also, that BOTH the new and the old site point to the same database:

Old Site PHP code . . . . . . . . . . . New Site PHP code
. . . . . | . . . . . . . . . . . . . . . . . . . . . . . . | . . . . . .
. . . . . |________________________ | . . . . . .
. . . . . . . . . . . . . . . . . . | . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . Single Database . . . . . . . . . . . .

You need to make sure you prevent access to the old site by doing as I suggest in my earlier post.

In your OLD SITE (folder called hp_zencart)...

  1. Re-name index.php to index-php.txt (or similar - make it difficult for someone to guess it)
  2. create a blank index.html page and load it to that folder.

Code for blank index.html:

<html>
<head>
<title></title>
</head>
<body></body>
</html>
9 Jan 2009, 10:02 AM
#16
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Moving my site to another folder- help!

Note:
This is good if you have no search engine indexing of old site pages, or if you want to forget about any old site ranking;
if you want to keep any index/links/page rank, you should do a redirect per the link in post 9.

This will also have the effect of preventing access to the old site.

14 Jan 2009, 10:44 PM
#17
mw4kids avatar

mw4kids

Zen Follower

Join Date:
Oct 2008
Posts:
403
Plugin Contributions:
0

Re: Moving my site to another folder- help!

Hi All,

so I started working on these configure files and ran into some issues:

1st. I just want to make sure...do I change these files to, even though they were not listed in the tutorial?

Includes/configure
// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', ''); // prefix for database table names
define('DB_SERVER', 'mysql7.websitesource.net'); // eg, localhost - should not be empty
define('DB_SERVER_USERNAME', 'mwelch_hp_zenc2');
define('DB_SERVER_PASSWORD', 'R`nlmGMDe,');
define('DB_DATABASE', 'mwelch_hp_zencart2');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'db'); // leave empty '' for default handler or set to 'db' or optionally 'mysql' in some cases

And...

admin/includes/configure
('DIR_FS_FILE_MANAGER_ROOT', '/hsphere/local/home/mwelch/thrift4kids.com**/hp_zencart/'); **// path to starting directory of the file manager

// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', '');
define('DB_SERVER', 'mysql7.websitesource.net'); // eg, localhost - should not be empty
define('DB_SERVER_USERNAME', 'mwelch_hp_zenc2');
define('DB_SERVER_PASSWORD', 'R`nlmGMDe,');
define('DB_DATABASE', 'mwelch_hp_zencart2');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'db'); // leave empty '' for default handler or set to 'db' or optionally 'mysql' in some case

After I started changing these config files, I noticed on my site that any products I added/changed since I moved my site to my root directory, no longer show an image (you can go to www. thrift4kids.com and enter **674 in the Search **window to see what i mean). Can this be due to the fact that the files above have not been changed yet?

thanks!

14 Jan 2009, 11:16 PM
#19
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Moving my site to another folder- help!

There are some information that you don't want to share with anyone . thats your database User name and pass.

since your site is working , I can only say that , you have used the same username and pass for new database . so my suggestion would be to change them using your host control panel and update your both configure.php.. Unless provided information here are from old configure files and those are not your current sensitivity information.

as for images . make sure you have correct permission set for images folder , if is not writable , first you get the warning on admin page that images folder is not writable and if you ignore that , your images will not show up since they are not in images folder.

you may want to remove the extra folder name form

('DIR_FS_FILE_MANAGER_ROOT', '/hsphere/local/home/mwelch/thrift4kids.com/hp_zencart/') since you are no longer have your store in hp_zencart

14 Jan 2009, 11:22 PM
#20
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Moving my site to another folder- help!

are you sure the fix_cache_key.php in your root folder ??????? it sounds like is not there