Adsense


This tutorial provides step-by-step instructions for how to develop multiple XOOPS websites locally using XSAS (XOOPS Stand Alone Server). I use this information pretty much on a daily basis, and I hope you find it helpful, too. As always, I welcome any feedback or suggestions you may have.

(It is assumed that the reader has a basic knowledge of folder structures, permission settings, how to perform basic operations in phpMyAdmin, and of course, how to install XOOPS.)

1. Create a folder on your hard drive called Localhost

2. Run the XSAS Setup program in that folder

3. Create your folders in the www root of XSAS to represent the different sites you will be developing (i.e.: Clients, Personal, etc.)

4. Extract a fresh distro of Xoops in a temp folder

5. Copy the html folder from your Xoops package into the various folders you created in step 3.

6. Rename the html folder to represent the particular site to be developed (i.e.: Client1, Site2, etc.)

7. Start the XSAS server on your local machine

8. Open PHPMyAdmin from the advanced tab of the XSAS GUI

9. Create a database that has the same name as the database used for your published website (the site on the Internet)

10. Open a browser and navigate to http://localhost and select the folder of the site you want to install (ex: http://localhost/clients/somecoweb/). This will begin the installation of Xoops as usual.

11. Setup Xoops as you normally would

12. Put the database name of the site you want to develop in the appropriate field, but put root as the database username with no password

13. Make sure you change the prefix for the tables to match the database you will import later (if applicable)

14. Complete your installation as usual

15. Export the database from your site that is on the Internet into a text file. (Be sure you export it with complete inserts and add 'drop table'. This will insure a proper import later.)

16. Open the text file in a text editor and do a find and replace for the url

(i.e.: Find the Internet url that the site would use online and replace it with the local url.
ex: Find: http://yourdomain.com/
Replace with: http://localhost/the_directory_where_you_installed_xoops/) Save your file.

**The copy and paste method works best for the aformentioned step.**

17. Open PHPMyAdmin in XSAS and import the database you just edited.

18. Now test your site out.

**If you will be developing multiple sites, I've found it quite convenient to keep a bookmark of http://localhost and I add a bookmark for each additional site when I begin development (i.e.: http://localhost/clients/client1, http://localhost/clients/client2, etc.)**

Now, after you've made all the changes you want to your site locally, you only have a few steps to follow to publish your work online.

19. You essentially repeat steps 15-18, but instead, you export from localhost's database, edit the sql file to change the url to the Internet url, and you import the database into the online SQL server.

**It's also important to note that, if you have added any additional files to your website while developing it locally (i.e.: themes, modules, hacks, etc.), you'll want to upload those files to your web server prior to updating your database.**

On another note. If you want to work on your website away from home, if you've setup your local server as I've outlined, you can just copy the entire Localhost folder onto a USB Pen Drive and take it with you. Then all you have to do is just execute XSAS directly from the pen drive on any Windows 98 and above system. Since XSAS always creates a virtual w: drive, this method works quite well for portable development and demonstration.

This article mainly focuses on XSAS and XOOPS, however, similar steps can be used for virtaully any standalone server software and content management system. These two were used because it is a combination I know to be relatively bug-free and easy to use.

Post a Comment