How to duplicate a live site to use as a test site

I did http://www.mydomainname/test/index.php but got error. Page not found.

can you see it in the directory, using your FTP client or cpanel?



How do you get to www.yourdomain.com/test/admin.php (admin CP) to change board option url and title?

If that isn't working, it sounds like you just uploaded the folders and not the files, especially index.php and admin.php

With index.php in place it should open as opposed to what you are getting in your browser, i.e. just the list of folders
 
Last edited:
can you see it in the directory, using your FTP client or cpanel?





If that isn't working, it sounds like you just uploaded the folders and not the files, especially index.php and admin.php

Wit index.php in place it should open as opposed to what you are getting in your browser, i.e. just the list of folders
Ah true, my mistake. I uploaded all folders under public_html, forgetting about the 10 or so files directly under it. I will do that now thanks!
 
example structure for newbies like me:

public_html (original)
cgi_bin
data
install
library
etc
test (new test folder)(copied all files and folders)
cgi_bin
data
install
library
etc​
 
Last edited:
test (new test folder)
public_html (copied files and folders)
cgi_bin
data
install
library
etc

That public_html folder needn't be there (also cgi_bin is not required in either)

Put all the xenforo files and folders directly in /test/

I prefer to use a subdomain for this, e.g test.example.com
 
Very useful guide, just helped me set up my local dev site. Thanks Brogan (y)

I've just got a few questions about your local update installation steps...

mysqldump -u<user> -p<password> --single-transaction --skip-lock-tables db_name > /path/to/backup/db_name_$(date +%d.%m.%y).sql

Does <user> = <database user> ...and does <password> = <database password> ? and do they need to be between the < > ?

tar -czf files_$(date +%d.%m.%y).tar.gz /path/to/install

Does it have to be the full path eg: /home/username/public_html/forums ?

mysql -uroot -proot db_name_dev <db.sql

If a root password is set, would proot = "pthesetpassword" or just "thesetpassword"

Thank you
 
Does <user> = <database user> ...and does <password> = <database password> ? and do they need to be between the < > ?
The brackets are just to define the parameter you put in.. you do not include them.

Does it have to be the full path eg: /home/username/public_html/forums ?
yes, as that is the full path - if you are doing it via a script. Of course, if you are doing it manually then you can always use the ./ shortcut if you are in your /home/username directory.

If a root password is set, would proot = "pthesetpassword" or just "thesetpassword"
mysql -uusername -ppassword db_name < db_import_name.sql

if using CentMin Mod, then it will be different.
 
Thank you Tracy, to be fair, I don't think I know enough to perform these steps anyway, I thought this could be done in phpmyadmin, but after reading more about it, I'm not even sure if that's correct. I'll have to investigate further before trying this method
 
Thank you Tracy, to be fair, I don't think I know enough to perform these steps anyway, I thought this could be done in phpmyadmin, but after reading more about it, I'm not even sure if that's correct. I'll have to investigate further before trying this method
the mysql commands have to be done from terminal (command line interface).... so it pretty much assumes you are on a VPS/dedi with SSH access.
Do NOT trust phpmyadmin exports for your backup. They are frequently corrupted. If you are using cPanel, then a cPanel backup would be better.
 
Newbie question... I have my production site at domain.com and want to set up my (remote) test site at staging.domain.com. I have different users set up for the production and staging environments/databases.

How can I get a copy of the xenForo database from domain.com to staging.domain.com? I've tried exporting/importing via phpMyAdmin, and I'm running into the following error when importing to the staging database:
MySQL said:
#1044 - Access denied for user 'stagingUserName' @'xxx.xx.x/xxx.xx.x' to database 'productionDatabase'​

Issue related to max_allowed_packet in MySQL? Thanks for any ideas.
 
I wouldn't recommend using phpMyAdmin to export/import a database - it is prone to error and corruption.

Ideally you should use SSH and the mysqldump command.

If the databases have different names and users, ensure you update the details in the library/config.php file.
 
Newbie question... I have my production site at domain.com and want to set up my (remote) test site at staging.domain.com. I have different users set up for the production and staging environments/databases.

How can I get a copy of the xenForo database from domain.com to staging.domain.com? I've tried exporting/importing via phpMyAdmin, and I'm running into the following error when importing to the staging database:
MySQL said:
#1044 - Access denied for user 'stagingUserName' @'xxx.xx.x/xxx.xx.x' to database 'productionDatabase'​

Issue related to max_allowed_packet in MySQL? Thanks for any ideas.
I use bigdump rather than phpmyadmin, works great!
 
Using SSH is fairly straightforward.


Dump:
Code:
mysqldump -u<user> -p<password> --single-transaction --skip-lock-tables old_db_name > /path/to/backup/file_name.sql


Restore:
Code:
mysql -u<user> -p<password> new_db_name < file_name.sql
 
@Brogan big thanks for this thread and your answers to my questions. Got the test site working, and it's a big relief to be able to test things somewhere other than a production site. Thank you!
 
Even though I have my memory_limit on 512MB as @Brogan has instructed, I'm still getting this error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 404784220 bytes) in
C:\xampp\phpMyAdmin\libraries\zip_extension.lib.php on line 52
 
Top Bottom