vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How do I Test Mods & Hacks without Messing up my Live Site? (https://vborg.vbsupport.ru/showthread.php?t=170781)

NashChristian 02-17-2008 08:53 PM

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

Lynne 02-17-2008 09:30 PM

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.

NashChristian 02-17-2008 09:55 PM

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

Lynne 02-17-2008 10:10 PM

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.

Marco van Herwaarden 02-18-2008 06:47 AM

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

B) Also look into Parent / Child styles to minimize template editing.

NashChristian 02-18-2008 12:53 PM

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

Marco van Herwaarden 02-18-2008 12:55 PM

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.

NashChristian 02-18-2008 12:58 PM

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 (Post 1445512)
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

Lynne 02-18-2008 02:18 PM

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.

NashChristian 02-18-2008 02:56 PM

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 (Post 1445942)
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 (Post 1445882)
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

Lynne 02-18-2008 04:08 PM

Quote:

Originally Posted by NashChristian (Post 1445967)
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

Hmmm, I've never had to do that. I'd be interested in a response from a vB Staff member on this. I would think it would be OK to temporarily disable the htaccess just for someone to see what is going on. You just want to make sure that the test forums are suddenly being 'used' as a forum. Either temporarily disable the htaccess, or PM the person who wants to look at the site with the username/password to get into your test site.

Quote:

Originally Posted by NashChristian (Post 1445967)
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

If the links don't matter for testing purposes, then I'd just leave them alone. But, if "$vboptions[bburl]" is the same as "http://mysite.com", then I would replace them just because it does allow you to move to a test site and have the links still work. I like to make my stuff as generic as possible so I don't have to change anything when I move it to the real site.



I see a few people have said they don't even use a test site. I'd love to hear about how they upgrade their sites without first doing things on a test site. My site would have been down for a month if I didn't use a test site to rewrite all my mods when I upgraded from 3.0.12 to 3.6.8! Sure, I found some plug-n-play mods here to replace others I had installed, but I had to totally rewrite the mods I have made on my own for my site. That took quite some effort and a LOT of testing (and added a few gray hairs)!

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

Jeff, are you sure all the files are uploaded (the ones your error messages say it can't find)? Also, make sure the permissions are OK - the ones you reference above "following check boxes for each category: Read/Write/Execute." See what they were marked as on your live site and make sure they are the same on your test site.

NashChristian 02-18-2008 04:23 PM

Hello Lynne,

For me it stands to reason that a test site is the only way to go, without excessive downtime. Now I'm just trying to learn the most painless way of doing that.

I'll double check the files, but I FTP coppied the entire site and it said that it coppied fine. I'll manually check though.

Thanks again!
Jeff

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

Dang! FileZilla let me down! A bunch of files are missing on my test site.

I will have to download and re-upload again.

(I probably should have thought of that one on my own... I automatically figured it was a configuration issue.)

Thanks for the help Lynne!
Jeff

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

Hello again.

I deleted and completely re-uploaded my test site and all contents. I've compared directories, and according to FileZilla, they are identical.

Now when I try to log into my AdminCP, it all appears to work fine, with one small exception: after I type in my password, and it gives me the "Thankyou for Logging In" splash screen, it goes directly back to the log in screen, as opposed to entering the Control Panel.

I've tried this with the Moderator CP and it is doing the same thing.

Anybody got any ideas what the heck is going on here???

Thanks for any assistance!
Jeff

bazzup 02-18-2008 06:04 PM

heres what i done download this http://sourceforge.net/project/showf...ckage_id=48193 its basically a desktop server for local testing purposes copy all your site over to it just as good as testing on your live site

NashChristian 02-18-2008 06:09 PM

Ok, so I tried this with Firefox instead of IE (which I primarily use) and it actually DID log into my Control Panel, but STILL a problem (I thought that maybe it was a cache issue, but apparently not):

Although the path in my browser told me that I was in the Control Panel for my TEST site: all of the changes that I made actually occured on my LIVE site as well.So I went back and forth between the two control panes (live and test site) and any changes which I made on the one, would show on the other. So for some reason, I'm obviously logging into my live control panel, though it says it is on my test site. I have no idea in the world why!

To add insult to injury, I discovered that my .htaccess protected directory was extending beyond my subdomain directory and for some reason including my primary domain directory, though they are completely separate and unrelated folders. I have several other domains/sites in the same shared hosting root directory as these two folders are in, however none of my other sites were affected by the password protection.

I've had to temporarily disable the .htaccess password protection of both directories until I can figure out what is going on, and how to only apply it to the test folder.

I'm lost!

Can anyone help???

Thanks.
Jeff

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

I'm finally getting desperate enough to read the vB users manual!

I'm seeing that vB recommends performing backups through the AdminCP > VBulletin Options > Backup/Restore Settings and INDIVIDUALLY backing up each product including vB, then restoring them in a simular fashion.

Is this what I NEED to do, or can this be done via FTP? FTP seems like a much quicker and simpler method IF it will work correctly, but so far I've not had any luck.

Please advise.

Thanks!
Jeff

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

These are itty-bitty xml files that seem to include standard settings and values, but don't appear to include any hacks or phrases that I've modified, etc...

Surely this isn't the best way to do this. FTP must be the way to go, but why won't this work for me???

Please help!
Jeff

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

Quote:

Originally Posted by bazzup (Post 1446107)
heres what i done download this http://sourceforge.net/project/showf...ckage_id=48193 its basically a desktop server for local testing purposes copy all your site over to it just as good as testing on your live site

Hello Bazzup,

Thanks for the feedback.

Is it easier to use a local test site than one online? Do you just copy the entire site via FTP to your local machine? After you download that server package, are you ready to start working on your site right away, or do you have to do something special to configure your site for your local machine? (Change paths, etc... ?)

I'm also wondering if the programs in this server download package will continually run in the background on my machine (taking up resources) or just launch when I'm working on my test site?

Thanks again for the help!
Jeff

bazzup 02-18-2008 07:08 PM

hi jeff,

I'll quote these instructions from another site.

Quote:

There is Nothing like working on your site and trying out the latest tricks or making a layout change and having the whole thing just come crashing down around you. The dreaded "page not found" or pages being rendered wrongly can be costly. Not only in time but in visitors that have tried to view your site, only to see its gone now! We have all been there at some point in time and know its pain. 1st impresions are important and chances are once they attempt to visit your website, and its down- or looks all wierd, they wont be back. Lets try to avoid that by setting up a test server.

Usually setting up servers is a little more complex on the windows OS and cross platform problems begin to appear. This is because most web servers use Apache running on Linux or Unix. XP/ME/98 all use a diff format then the *nix Operating Systems (OS). Therefore most of the time it was best to have a dedicated pc or seperate partition running linux and apache. Making the simple desire to have a test server, a complex problem with a steep learning curve. Well that time has passed.

With Uniform server, its so simple that if you can setup a forum or run a CMS like joomla you CAN run a test server using Uniform. Its so easy and believe this, there is nothing to install. You can even fit it on a flash drive, or a cd and run it from there.

Step 1->
The first thing to do is download the latest version from here. You want the most recent version (right now it is 3.3) so download either the .exe or the .zip if you prefer zip files. The .exe will just extract the files for you on its own. The download is only 5.8mb so its really small for a fully functional server.

Step 2->
Once downloaded go to the location you saved the file and double click to start the extraction. It will ask where you want it to extract the files to. Choose your desktop or somewhere else that you can find it easily (if you downloaded the .zip file then use winzip, winrar or similar to extract the files).

Step 3->
Once extracted the files will be in a folder named "Uniform Sever". Thats it! There is no installation at all. It runs right from that folder so you can put it anywhere on your hdd. It will emulate a new hard drive W: as your website drive when its running. You can move this "Uniform Server" folder to a cdrw, flash drive any portable media even and take your test site with you! Great for site backups too.

Now that you have the folder (actually the server) lets set somthing up once to see how it works.

Open the Uniform Server folder now. Inside you will find 1 folder and 3 files.
"Server_Start.bat" will start apache and everything needed for the server just by clicking it.
"Stop.bat" will shut the server down and all programs its using (mySQL, php, apache etc,).
"Disk Start.vbs" you wont do anything with so ignore that file.
"diskw" is the folder for the emulated hard drive w that the uniform server uses. This is where all your website files are saved.

So its really as simple as clicking Server_start to start it up and Stop.bat to shut it all down.

O.K. now your wondering "where do all my site files go then? On vistapages I put them under my www folder so where do they go here?"

Open the folder named diskw. Now THIS should look familiar. If you use a FTP program or the cpanel file manager youve seen these folders before. Open the folder named www. Youll see a few files here. The only one you need is the .htaccess file! The other three are the files used for the default site http://localhost/. You can delete "favicon.icon" "index.php" and the "images" folder if you want to. Now its just like the www folder on vistapages. Anything named index on the homepage will be the site loaded when going to http://localhost/

So if you have a folder say named "album" on your vistapages site, you would have one in your test server aswell under www folder. To then open that folder in a browser its also exactly the same http://yoursitename.com/albums/ becomes http://localhost/albums
Its the same file structure in everything you do so no confusing changes aside from the domain name becoming localhost on your test site.


Now that the file structure is explained lets move onto getting it up and running. So lets get it started. Double click Server_start.bat Youll see a black box popup then diapear in a flash, this is the .bat launching all the "stuff" the server needs. Now your browser will automatically open to the address http://localhost/apanel/

"what is apanel?"
Think of apanel as Uniform Servers version of Cpanel we are used to here at vistapages. apanel is where you control your server and the services it runs. By default everything you need for basic websites is started.

If you have a CMS, Forum or any data base (DB) driven software then there is one more thing to start. If you closed the browser earlier when it opened just go there now. Open your browser (Internet explorer for instance) and put http://localhost/apanel/ in the address bar. Click go. Now your in the apenl. On the left of apanel youll see a column you can scroll down. Up at the top left where it says Server Start click the 3rd link under it Run MySQL
This will start MySQL for those DB driven sites. If you look further down that left column under tools youll see the all familiar phpMyAdmin. Here you can easily insert/update/copy tables, run querys, you name it. Its a full featured phpMyAdmin.

On your live site, open phpMyAdmin, choose the DB you want to use. once that opens select the export tab. Now choose .sql and save as file. Save this to your desktop.

Open Uniform servers phpMyadmin. Create a Data Base (DB) with same name as your live sites DB. Now you have a test DB but no data in it. In phpMyAdmin on the left side under databases: select the db name you just created. It will open that db, now at top you see tabs, these let you do diff things with the currently selected data base. Click the SQL tab. In here you want to either enter SQL as text or in our case just under that area that looks like a text box you see "OR location of teh text file. Click the "browse" button there and point to the file you downloaded earlier from your live site. Now simply click "go" under it. You now have a clone of you database thats online. Neat huh.

Next Uniform server guides will tell you how to setup a domain name on the uniform server, use redirects, how to access your test server from other networked pcs on your lan by editing .htaccess, and adding security by chaning the default username and passes. I hope this guide helps some in over coming the intimidation of setting up their very own test server.
its a bit outdated this as the post i quoted it from is a cople of years old but its very easy to setup and use

regards

bazz

Lynne 02-18-2008 07:24 PM

Jeff, did you make sure to change your includes/config.php file to point to the test database and not your live database?

NashChristian 02-18-2008 08:51 PM

Lynne,

Actually I didn't remember where to find the Config.php file, until you just told me, in the includes folder. Now I have gone ahead and implemented that, and double checked the settings. Now, thankfully, I am no longer pulling the data from my LIVE site on my TEST site, however, instead I am getting a slew of database errors:

Quote:

Database error in vBulletin :

Invalid SQL:

SELECT *
FROM NCdatastore
WHERE title IN ('','options','bitfields','attachmentcache','forum cache','usergroupcache','stylecache','languagecach e','products','pluginlist','cron','profilefield',' maxloggedin','acpstats','mailqueue','pluginlistadm in');

MySQL Error : Table 'db235309784.NCdatastore' doesn't exist Error Number : 1146
Date : Monday, February 18th 2008 @ 05:35:37 PM
Script : http://test.nashvillechristian.com/f...incp/index.php
Referrer :
IP Address : 69.180.197.225
Username :
Classname : vb_database
After getting this message, I double checked my database settings in the Config file, and they are correct. I STILL haven't imported my database data from the LIVE site, as I'm unsure how to do this. I thought that I should do it through the AdminCP, however with the current database errors, its not allowing me to access my AdminCP for my test site.

Am I supposed to go into phpMyAdmin through my server control panel to first import this data?

How should I proceed?

Thanks again for all the help!!!
Jeff

(I feel like we are getting CLOSER!)

Lynne 02-18-2008 08:56 PM

Jeff, if you aren't using a copy of your live database, exactly what database are you using for your test site? You need to use a populated database or you will get errors such as "table doesn't exist" :)

NashChristian 02-18-2008 09:05 PM

I setup a new database through the same ISP (1&1). It just doesn't have any data in it yet. I thought that the order of events was to create the database, path it, and import my data from a backup of my live site.

I already have the backup of my data from my live site, now how should I go about importing that into my new TEST database?

Thanks!
Jeff

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

I'm guessing that this is the answer to my question: Restoring the Database via phpMyAdmin.

I'm currently trying to do this, but having problems. I'm going to contact my ISP for support.

I would still be interested in hearing people's reasons for prefering either online or local Test sites vrs. the other.

Bazzup, thanks for the info on Uniform Server. After I get this work online (if I can), I'm going to look into that for local presentations of the software. It definately appears to be a simple and low load solution!

Thanks again for everyones help!
Jeff

Lynne 02-18-2008 10:02 PM

Quote:

Originally Posted by NashChristian (Post 1446220)
I setup a new database through the same ISP (1&1). It just doesn't have any data in it yet. I thought that the order of events was to create the database, path it, and import my data from a backup of my live site.

I already have the backup of my data from my live site, now how should I go about importing that into my new TEST database?

Thanks!
Jeff

Yes, you should now go import a database and then run the upgrade script located in your install folder. But, what I was saying is that you tried to hit the index.php page and were mentioning errors but of course you will get errors because it is trying to get data from tables that don't exist.

Did you backup the live database through ssh? you should have done a mysqldump doing a call like: "mysqldump --opt -Q -uUSERNAME -p DATABASENAME > /PATH/TO/DUMP.SQL" where USERNAME is the mysql server username from your config.php file and DATABASENAME is the name of your live site database from the live server config.php file. It should ask for a password, also the same from the config.php file. Then to import it you would do something like: "mysql -uUSERNAME ?p TESTDATABASENAME < /PATH/TO/DUMP.SQL" again with only this time the name of the database is NOT the live site database name, but the TEST SITE database name (from the TEST SITE config.php file). It probably has the same username and password, I would guess.

NashChristian 02-18-2008 11:00 PM

Lynne,

I backed up the live site database through my vB AdminCP>Maintenance>Database Backup. Is that ok?

I'm on hold with my ISP right now. They're phpMyAdmin control panel is not allowing me to import a file over 8mb to restore the database, and my file is 13 MB! So they are having to import it via the SSH option for me, as I don't have SSH permissions on my account.

I need to find a new host for this site. 1&1 only allows a max database size of 100MB. They will allow me multiple databases, but their max. file size is still 100MB per data base, which is not going to be enough.

I've heard that SiteGround.com has awesome prices for forum sites, so I've been planning to look into making the switch once my site got up and running. I was just trying to hold off on getting another monthly expense, since I already had the shared hosting package through 1&1.

I was thinking that without the data, I would still get my site looking like the day I purchased it from vB, just without content. I was forgetting that vB uses the database to store a lot of settings and internal data besides just the threads and posts.

So I have to run the upgrade script after this database gets restored? I wasn't anticipating this step. What will the upgrade script do in this instance?

I'm also curious, if later on, I want to update the data in my TEST site, how do I OVERRIGHT the data that I'm currently importing into the test database tables?

Also, how do I know which settings I change are stored in the database? So basically, if you make changes on your test site that are stored in the database, you have to go in and manually make the same changes again to your live site, since there is no way of automating this process once you like the changes, is that correct?

So do you just use this for modifying templates and installing mods? If I go in and edit phrases and things like that, a test site really won't help much will it?

I'm a little confused. I was hoping that a test site would be as simple as testing all changes and functions, then once you work the bugs out, upload it to the new site. It seems that there is a bit more to it than that. Can you give me an idea of what you realisitically use it for, and what types of changes are more a pain than their worth in a test environment?

Thanks a bunch!
Jeff

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

It's been a long day, but I think that I've got this all worked out now. (Thanks to all your help!!!)

After I got my database restored to the new test database, and the config file setup correctly, the two sites (live and test) now seem to be operating independantly.

Once this was done correctly, I was able to reinstate my .htaccess password protection on my test site, without it affecting my live site anymore.

I still have a couple of outstanding questions which I would like to understand, if anyone would be so kind as to answer:

First I did not run the upgrade.php, and I want to ensure that is OK. The reason I didn't run it, is because I am not wanting to modify my site version prior to 3.7 going gold. I'm simply wanting to setup a test site at the moment for any mods/hacks. Did this need to be run for some reason, even without actually upgrading to a newer version of vB?

Am I correct in thinking that any settings which I change, or hacks that I implement are stored in the DATABASE except for the templates for each style? Or maybe the templates are too, but they can be downloaded and then imported into my live site?

I'm confused about what changes I should try to make on my test site, and what I shouldn't bother trying to do because I will still have to go manually make the same changes on my live site afterwards. Can someone please explain this to me? What changes are worth making in a test environment?

Initially I thought that I could test ALL changes, and then simply FTP overwright my live site with my test site after I work out all the bugs. This seems to NOT be the case though, for two reasons: First with an online test site some of the pathing would be different. Surely I could try to minimize this, but still SOME would be different. This may be avoidable with an OFFLINE/LOCAL test environment, if the .htaccess file will allow ALL site variables to remain the same, however there still is another problem: any settings or changes stored in the database will not upload along with the test site when I overwright my live site. I don't see any way around this, since there is no way for your test database to stay current in Real Time, with the data that has been entered via posts & threads, since the time when the test environment was created. Unless there were some sort of a mirroring of the data, which I'm unfamiliar with in this application.

Do Admin's who use local test sites find it more helpful to do so? Do they really NOT have to modify any site variables? Can they simply FTP overwright their live site with their test site once the work is done? How is it better and why does it help?

So, how do admins really and truly get the MOST out of a test site? Do they typically only use it for template modifications and upgrades? How can I use this to my best advantage?

I'm also curious, if later on, I want to update the data in my TEST site, how do I OVERWRIGHT the data that I've just imported into my database? Is there some way to flush out the database and reload it? Or must I create a new database and simply delete the old one, forcing me to redo a bit of configuration work?

I have one last question I mentioned earlier, for Marco or another vB staffer:

With my entire test site directory .htaccess protected, 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. (This could be anyone.)

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

Thanks again for everyone's help! Thank you especially Lynne for all the time you took to help me today!

:):D:)
Jeff

Marco van Herwaarden 02-19-2008 08:11 AM

Quote:

Originally Posted by NashChristian (Post 1446284)
I have one last question I mentioned earlier, for Marco or another vB staffer:

With my entire test site directory .htaccess protected, 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. (This could be anyone.)

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

As per the License Agreement you are not allowed to have public access to a testboard. Giving out the access details to a few in order to test/bugfix is within this definition.

Lynne 02-19-2008 01:53 PM

Jeff, you asked about the purpose of a test board. I use it to test out anything prior to putting it on my live site. But, besides that, the major thing I use it for is upgrades. For instance, in December I finally upgraded my board from 3.0.12 to 3.6.8. I started in November by taking a copy of my live database and putting it up on my test board along with the 3.6.8 php pages and running the upgrade script. Then I installed all the hacks I needed and rewrote the ones I had originally written. After I had it running how I wanted, I took down my live site for an upgrade. Then, I knew I had a couple of other mods to write, so I did them on the test board, exported the product and then imported the product onto my live site. The product/plugin system makes it very easy to move a mod from the test site to your live site. Currently, I have upgraded my test site to 3.7 (only beta 2 at the moment). I am now rewriting some more of my hacks to take advantage of some of the changes made to 3.7. I would never install a hack directly onto my live site without first checking it out on my test site. Of course, I am also one of those that rarely uses a hack as-is. I always seem to want to tweak it a bit for my site.

NashChristian 02-19-2008 04:40 PM

Quote:

Originally Posted by Lynne (Post 1446644)
Jeff, you asked about the purpose of a test board. I use it to test out anything prior to putting it on my live site. But, besides that, the major thing I use it for is upgrades. For instance, in December I finally upgraded my board from 3.0.12 to 3.6.8. I started in November by taking a copy of my live database and putting it up on my test board along with the 3.6.8 php pages and running the upgrade script. Then I installed all the hacks I needed and rewrote the ones I had originally written. After I had it running how I wanted, I took down my live site for an upgrade. Then, I knew I had a couple of other mods to write, so I did them on the test board, exported the product and then imported the product onto my live site. The product/plugin system makes it very easy to move a mod from the test site to your live site. Currently, I have upgraded my test site to 3.7 (only beta 2 at the moment). I am now rewriting some more of my hacks to take advantage of some of the changes made to 3.7. I would never install a hack directly onto my live site without first checking it out on my test site. Of course, I am also one of those that rarely uses a hack as-is. I always seem to want to tweak it a bit for my site.

Hello Lynne,

So just to make sure I understand, say you are upgrading your site to the latest and greatest version, after you get your test site setup, hacks and mods to your happiness, everything running smoothe, how then do you move these changes onto your live site? You said that you did it all with just a couple of hours of downtime, which is impressive! Do you delete your live site folder and then recreate it by copying your test environment via FTP?

Then you would just have to reconfigure the database to use your live data. And you would likely have to redo any changes done in your test environment which were stored in the database.

Or do you simply run the upgrade script on your live site, import the templates from your test site, individually import each plug-in from your test site, and manually make any other changes that you've made where the settings are stored in the database? You manually write these in your notebook as you implement them on your test site, then you manually implement them on your live site as well during this process?

Which would best describe how you actually do this? I just want to understand how best to take advantage of a test site myself. I don't want to do something the "hard" way if there is an "easier" way that most of the world is doing it.

Thanks ever so much!
Jeff

Lynne 02-21-2008 02:17 AM

Quote:

Originally Posted by NashChristian (Post 1446744)
Hello Lynne,

So just to make sure I understand, say you are upgrading your site to the latest and greatest version, after you get your test site setup, hacks and mods to your happiness, everything running smoothe, how then do you move these changes onto your live site? You said that you did it all with just a couple of hours of downtime, which is impressive! Do you delete your live site folder and then recreate it by copying your test environment via FTP?

Then you would just have to reconfigure the database to use your live data. And you would likely have to redo any changes done in your test environment which were stored in the database.

Or do you simply run the upgrade script on your live site, import the templates from your test site, individually import each plug-in from your test site, and manually make any other changes that you've made where the settings are stored in the database? You manually write these in your notebook as you implement them on your test site, then you manually implement them on your live site as well during this process?

Basically, once I have my test site running how I want it, I export my styles and my modifications from the test site to my computer and then shut down the main site, replace all files with copies of the ones from my test site (that I keep on my computer), run the upgrade script, import all the hacks and the styles (I only have one main template edit style, the others are just css, so I don't need them imported) and then turn back on my main site. Of course, nothing is quite that simple, but I've done it a couple of times now and I've learned what needs to be done. I've also done test runs before - gotten the test site set up how I wanted, exported all modifications and styles and then completely replaced the test site with a copy of the live database and done the upgrade all over again.

NashChristian 02-21-2008 03:04 AM

Thanks again for the feedback Lynne!

You have really helped me a lot, through this learning curve!

:) Jeff

goxy63 12-18-2008 09:23 AM

Ok I installed new testvb on to my server, right next to my live forums

1.How exactly to copy php database ?
I got 'PUTTY' SSH program, can connect to my server but not shure about that codes
Iam afraid to do some demage and mess up thing...so I was thinking its better to ask first you guys

My live forums are in mydomain/forums
and my testvb is installed in mydomain/test/testvb (pasword protected for general public)

2.Which files except php database I should copy from my live forums to my test ones ?
Customavatars,customprofile pic,images,signature pic....maybe its easyer to say which one I should not ?

3.How about blogs and my VBADynamics(VBA is installed outside of my forums, in a root)
Will I be able to test everything good cuz VBAD, I use this mod just for a my front page!?

4.Through Admin CP, I should download styles, and upload them to my testvb
something else through admin cp, plugins, products and stuff ?
-----------------------
Iam having Vb just about two months, nothing is that hard to do but for guys as me can be real pain in.... cuz Iam not familiar much with HTML CSS and...
Menaged a lot to do for these 2 months but I need real bad this testvb
When I have this copy of my live board I will do more things by myself and will not bother Vb stuff and Vb.org guys that much in future :D
Tanks in advance for help
Details will be highly appreciated


All times are GMT. The time now is 11:52 AM.

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.02497 seconds
  • Memory Usage 1,951KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (27)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete