2

I'm my own developer for my little discussion forum and commerce website. So far so good.

Now I want to create a complete/exact copy of my production site so I can do development work without putting the production site at risk. I registered a domain www.dev-foosite.com that I hope can become the copy of my site www.foosite.com

Here's the snag. I have a VPS hosting account which works great so far -- but I can't use the cpanel backup from the main site, as a restore to the dev site. My hosting company says that there is a username conflict and even if we change the username, then the mySQL databases will need to be renamed.

So before I get wrapped around the axle on this, how should I proceed? I'd rather not have to purchase another separate hosting account but if that's the only answer I guess I will.

C C
  • 419
  • 1
  • 4
  • 18
  • 2
    Why would you do development online? Just install a web server and do the development on your own computer. – JJJ May 29 '13 at 13:46
  • What is your development environment? What tools are you using (Visual Studio, Eclipse, Notepad...?) and what type of hosting do you have? Is it PHP hosting, Windows Hosting, etc...? This is in no way an anwser because I need more info first, but I run a few Windows-based sites and I use Visual Studio. What I usually do is create a local SQL Compact database for offline testing, and then when I am ready to go production (if I already have a website in production) I "migrate" the SQL Compact to a fullblown SQL 2008 DB hosted on the servers. Not the best way but works great for me. – jay_t55 May 29 '13 at 13:50
  • I just noticed the phpbb and mysql tags. Have you installed Apache or Abyss Web Server? They allow you to run your sites locally... – jay_t55 May 29 '13 at 13:51
  • 1
    I could do that but is there any risk that my local environment would be too dissimilar to my hosting company, and something would not work as expected? Or is the basic PHP, Apache, mySQL easy enough to set the same as my hosting company has them? mod_security for example...I don't even know if they would share the rules with me (?) – C C May 29 '13 at 13:52
  • One of the reasons why I left PHP and went with Windows hosting (though Windows hosting does have its drawbacks too). To be honest I don't know if they would give you the mod_security rules with you but if it will help then I guess it's worth asking for. – jay_t55 May 29 '13 at 13:57
  • 1
    It depends on what you're doing with your site but while I rarely had any issues between local and remote version, I did run into little problems every now and then, but I managed to either solve them or work around them. Sometimes the hosting providers are happy to make changes for your account (re modules). – jay_t55 May 29 '13 at 14:01
  • A wamp or xampp localhost is very hard to replicate an online host. I stopped using my pc as developing as there can be some errors with different versions of php and mysql. Best way is to develop online using a vps server. – Damien Keitel May 29 '13 at 14:40

2 Answers2

1

Go to phpmyadmin and export the database. In cpanel, go and make a new database. Then in phpmyadmin. Import the database.

Now, download all of the files into a folder from the forum using an FTP client like Filezilla

Then upload the previously downloaded files to the dev site

Edit config.php with the new database and password and change the server settings in admin control panel in phpbb to your new webiste url.

Damien Keitel
  • 786
  • 1
  • 5
  • 12
0

I think this website will help you out: http://www.phpbb-seo.com/en/phpbb-forum/local-server-setup-xampp-t4965.html

It basically runs you through downloading and installing XAMPP so you can download your remote site so you can work on it locally. When you're ready to go live, just publish the changes.

jay_t55
  • 11,362
  • 28
  • 103
  • 174
  • This website shows you how to install mod_security with XAMPP: http://www.debianadmin.com/xampp-all-in-one-web-server-installation-and-configuration-in-debian.html – jay_t55 May 29 '13 at 13:59
  • I appreciate your thought on this and those links -- and I am running an openSuse linux box in my basement with a huge RAID10 array so I could do local development. But I really didn't want to add "hosting services" to my plate right now and wanted to leverage my hosting company instead. Maybe for another $5 per month I should just have them open a new account for me and copy my production site to that (?) – C C May 29 '13 at 14:07
  • Hmmm, I'm not sure. An extra 5 per month doesn't sound too bad. Have you thought about WebMatrix? It has cool support for PHP and phpBB. You can develop/test locally on a PHP site with WebMatrix. – jay_t55 May 29 '13 at 14:15
  • There is something that you can do, in PHP (upload a php file to your production site with a really obscure filename (and delete it after a few minutes when you're done using it) that lets you see everything that your php server supports - I'll have a look for it because I don't remember what it is but I do remember that it really helped me figure out why sometimes my local site would work and why it wouldn't work on the server – jay_t55 May 29 '13 at 14:17
  • Ok I found it. It's phpinfo() and let's you see info about your server and what it supports (this can help you figure out any differences there may be between your local setup (XAMPP etc) and the production server): http://docs.simplemachines.org/index.php?topic=479.0 – jay_t55 May 29 '13 at 14:20
  • right, I know how to use phpinfo...thanks. I was more worried about the 'secret' apache settings my hosting company has at their fingertips which I might not be able to replicate. Right now I am talking to them about setting up an alternate account for $5 per month which if works is probably worth it. I love a challenge but like I said for $60 per year I can maybe avoid having to become an Apache expert...leave that education for another day... – C C May 29 '13 at 14:25