Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-17-2008, 08:53 PM
NashChristian's Avatar
NashChristian NashChristian is offline
 
Join Date: Jul 2007
Location: Nashville, TN
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How do I Test Mods & Hacks without Messing up my Live Site?

Hello,

What is the best, most accepted, and common means of testing new site features and functionality, mods, hacks, etc?

Do most of you have a second live instance of your site on the internet, which you just don't tell people about, used specificially for testing? If so, won't spiders still crawl the site and send traffic to you, although you don't want it?

Do most of you download all the server side programs locally (mySQL, PHP, Apache, etc...) necessary to setup a testing server locally, and then just keep one live instance on the web?

So far I've just been using one live instance, with no testing server, however when I make a mistake it sometimes can cost me some downtime. And often I tweak templates, that take me a while to correct and get exactly how I like. I hate to do all of this in real time on my site, where users are probably scratching their heads wondering what's going on.

The problem seems, even if I do use a testing server (whether local or online) that whenever I make template mods (and a lot of times I'm working with two or three templates at a time) it will be a pain to have to remember what I've done, and manually go in and make the exact same changes to the live site once the changes are determined to be what I want.

I'm sure that there is a protocol out there of how admins do this, PLEASE ADVISE!

Thanks a bunch!
Jeff
Reply With Quote
  #2  
Old 02-17-2008, 09:30 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I use a test site on my same servers (I have one webserver and one database server and use the exact same configuration for my test site). vBulletin allows you to have a test site up and running the same software as long as it is htaccess protected and not 'live', thus no spiders are crawling my test site.

After you get everything up and working correctly on your test site and you decide to upgrade your live site, you should export your styles. That way, when you upgrade your live site, you just import the styles and you don't have to redo all the template mods.
Reply With Quote
  #3  
Old 02-17-2008, 09:55 PM
NashChristian's Avatar
NashChristian NashChristian is offline
 
Join Date: Jul 2007
Location: Nashville, TN
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lynne,

Thanks for the response!

I've only been using vB for about 6 months, so I'm sort of new to all of this.

Few quick questions:

A.) How do I initiate this htaccess protection (aka not live) as you mentioned. Is that a single setting, which then prevents your entire site from being crawled by spiders? Will that work on my vBa portions of the site in my root folder (dynamics, link directory, etc...), in addition to my forums? Will the site otherwise function the same, it just won't get crawled by spiders? Is there a particular naming convention for the URL, in relation to the actual live site, which vB finds acceptable? (I remember with my licensing they wanted to know the URL of my site.) Should I setup a subdomain of my actual domain: http://test.mysite.com?

B.) When you say to import the styles, I'm unfamiliar with how to do that without uninstalling and reinstalling them. I'm currently offering 5 different styles to my users. How do I go about exporting them from my test server, to then import into my live site - as painlessly as possible?

C.) Does your test site utilize the exact same database that your live site does, or a replica of it?

Thanks a bunch for the ideas!

Are there others who do this differently, or is this the accepted convention?

Thanks!
Jeff
Reply With Quote
  #4  
Old 02-17-2008, 10:10 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A.) This is from their License Agreement:
If you have a valid Software license, you may set up an additional test forum in order to test code, template and database modifications. To make this clear to us and our license verification procedures, place it in a directory called 'testvb' and be sure to password protect it. It must not be accessible by the general public.

Mine is in a folder called 'test' and I have it available at test.mysite.org. This makes it easier for me to see exactly where I am at all times by hovering over any links.

Here's something from vb.com on htaccess. I htaccess protect my Admin CP, Mod CP, and my test site directory. I'm not sure if you have some sort of server software like cPanel or webmin, but I just use that to protect the directories. It then popsup a window like what you see when you go to the members area of vb.com - it asks for a username and password that you set up - not your vbulletin username and password. Since you must know the username and password in order to see the test site, it can't be crawled by spiders.

B.) If you go to your Admin Panel > Styles & Templates, one of the options is to Download or Upload the Styles. So, I download it from my test site and then after I upgrade my real site, I upload the style to my real site and it overwrites my old style with the new one which has all my newly modified templates.
Reply With Quote
  #5  
Old 02-18-2008, 06:47 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

C) Ofcourse a copy of your production database. Otherwise you would be testing on your production data.

B) Also look into Parent / Child styles to minimize template editing.
Reply With Quote
  #6  
Old 02-18-2008, 12:53 PM
NashChristian's Avatar
NashChristian NashChristian is offline
 
Join Date: Jul 2007
Location: Nashville, TN
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the feedback Lynne and Marco!

So to upload my test site, can I just download my whole site via FTP and then upload it again by the same means into a different directory?

And this will work to completely restore the site, including template mods, hacks, modules, etc...?

Thanks!
Jeff
Reply With Quote
  #7  
Old 02-18-2008, 12:55 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Copy all files.
Make backup of your database
Create a new database and restore the backup into this new database.
Update the config.php in your test install to point to the new test database.
If needed update Forum URL and Cookie settings in your vBulletin Options.

That should be all in most cases.
Reply With Quote
  #8  
Old 02-18-2008, 12:58 PM
NashChristian's Avatar
NashChristian NashChristian is offline
 
Join Date: Jul 2007
Location: Nashville, TN
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One concern that I have, is by placing the test site online in a different folder, it will break some of my links on the site that have been hard coded.

Is there a better solution, or is this what most admins do?

Thanks!
Jeff

--------------- Added [DATE]1203348215[/DATE] at [TIME]1203348215[/TIME] ---------------

Quote:
Originally Posted by Lynne View Post
Here's something from vb.com on htaccess. I htaccess protect my Admin CP, Mod CP, and my test site directory. I'm not sure if you have some sort of server software like cPanel or webmin, but I just use that to protect the directories. It then popsup a window like what you see when you go to the members area of vb.com - it asks for a username and password that you set up - not your vbulletin username and password. Since you must know the username and password in order to see the test site, it can't be crawled by spiders.
I have a shared hosting plan through 1&1. I have control panel access as well as FTP access, but I don't see any controls such as cPanel or webmin.

However when I use my FTP client, and I right click on the directory that I'm going to put my test site in, I can select file attributes for that directory. The options are as follows: Owner Permissions/Group Permissions/Public Permissions - with the following check boxes for each category: Read/Write/Execute. Will this accomplish the same thing? Would I just uncheck all three boxes in the "Public Permissions" file attributes? Would I also need to alter the Group Permissions?

Is this the same as the htaccess protection that Lynne is speaking of, or is this something totally different? If it is different, does anyone use 1&1 and can you tell me where to find these controls?

Thanks!
Jeff
Reply With Quote
  #9  
Old 02-18-2008, 02:18 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Owner/group permissions are different than the .htaccess directory protection we have been talking about. Here is a good page the will explain .htaccess protection: http://www.javascriptkit.com/howto/htaccess3.shtml

Sorry I missed C. above. I didn't see if for some reason. When I set up my test board, I make a copy of my database and copy it into a new database (like test_db) and copy all my attachment, avatar, torrent files and move them all over to my test directory. So, now I have all the information from my real site over on my test site. Then I upload the new php files from vbulletin and run the upgrade script. Then I install all the mods I need. I actually also have a little notebook that I keep notes in with the names of all templates I modify and all php pages I modify and a little note of why "mod to remove torrent", "mod to add spider count", etc. It's not a perfect method, but it helps me out a lot. I don't like having the site down for long, so if I have everything all neatly in order, I can upgrade my site a lot quicker. I recently upgraded from 3.0.12 to 3.6.8 and I only had the site down for less than two hours and that's due to all the preparation I did on my test site to get ready for that upgrade. I had some custom mods that aren't all plug-and-play, so that was pretty good timing for me!


As for you hardcoded links, you might want to take a look at them and see if they need to be. My navbar isn't standard vb because I have pages 'outside' my forums folder, so I actually 'hardcode' the link, but I do that by just putting "$vboptions[bburl]/" in front of all the links. It gets that variable from the vboptions. So, as long as it is correct in there, then I am fine. There are some threads with hardcoded links, but those don't affect my testing.
Reply With Quote
  #10  
Old 02-18-2008, 02:56 PM
NashChristian's Avatar
NashChristian NashChristian is offline
 
Join Date: Jul 2007
Location: Nashville, TN
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks again for all the help Lynne! I'm working on the .htpasswd file now!

One question does come to mind, with the .htaccess protected directory (my entire test site), how do I request help from others on public forums such as this one and vbadvanced? I have a lot of situations where I post a link to demonstrate the problem I am encountering, for whoever reads and responds to my post.

Is there a work-around for this with .htaccess, or do I need to temporarily disable it in times like this, or what do most admins to to facilitate this?

Thanks!
Jeff

--------------- Added [DATE]1203356514[/DATE] at [TIME]1203356514[/TIME] ---------------

Quote:
Originally Posted by Lynne View Post
As for you hardcoded links, you might want to take a look at them and see if they need to be. My navbar isn't standard vb because I have pages 'outside' my forums folder, so I actually 'hardcode' the link, but I do that by just putting "$vboptions[bburl]/" in front of all the links. It gets that variable from the vboptions. So, as long as it is correct in there, then I am fine. There are some threads with hardcoded links, but those don't affect my testing.
Hello Lynne! I think that I understand what you are saying here, but I'm unsure of the syntax. I use vBadvanced, so I have many links (for style graphics, etc...) that I hardcode to my root folder (or have to provide the full URL to). Are you saying that instead of using http://mysite.com I can use "$vboptions[bburl]/" and that will direct it toward my root folder for that website?

Thanks again for all your help!
Jeff

--------------- Added [DATE]1203357503[/DATE] at [TIME]1203357503[/TIME] ---------------

Quote:
Originally Posted by Marco van Herwaarden View Post
Copy all files.
Make backup of your database
Create a new database and restore the backup into this new database.
Update the config.php in your test install to point to the new test database.
If needed update Forum URL and Cookie settings in your vBulletin Options.

That should be all in most cases.
Hello Marco,

I understand the concept you are trying to get accross to me, but I must have missed a step somewhere.

First of all, I don't remember where to find the 'config.php' file.

Second, for some reason I can't log into my ADMINCP. I'm assuming that I need to change a few settings, defining where the site is located, etc... Do I not need to tell it where it is located (the full path) etc... or is that just with my vBa products?

When I try to log into my test site AdminCP, I get the following error:
Quote:
Warning: main(/homepages/20/d153189940/htdocs/test.nashvillechristian.com/forums/includes/init.php) [function.main]: failed to open stream: No such file or directory in /homepages/20/d153189940/htdocs/test.nashvillechristian.com/forums/admincp/global.php on line 34

Fatal error: main() [function.require]: Failed opening required '/homepages/20/d153189940/htdocs/test.nashvillechristian.com/forums/includes/init.php' (include_path='.:/usr/local/lib/php') in /homepages/20/d153189940/htdocs/test.nashvillechristian.com/forums/admincp/global.php on line 34
Which brings about my other question I asked earlier, how do I post a link for support on this, now that I have .htaccess protected my test site?

Also, since I have not been able to redirect the database yet, it appears to be pulling the data from my live site by default.

Any assistance would be appreciated!

Thanks!
Jeff
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:45 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05759 seconds
  • Memory Usage 2,276KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete