XFileSharing Pro - steps to transfer my site to another server?
steps to transfer my site to another server?
what steps do i have to do to transfer my site to another server?
*** Extra File-Server Installation ***
1) Copy all files and folders from "FS-dist/cgi-bin" into FileServer cgi-bin folder.
Copy all files and folders from "FS-disr/htdocs" into FileServer htdocs (public_html) folder.
NOTE: use binary FTP mode for script files upload.
2) Chmod install_fs.cgi to 755 and run it in browser.
It will set correct permissions for other files and put correct paths into config.
3) Login with admin account and go to "Server Management" section, click "Add new server".
Put your FS cgi-bin and files URLs there, then Main server will test & update FileServer configuration.
INFO: After installation try to open env.php which is in FileServer files folder in browser - it should show you error or source code.
If you see full path, then check that you've moved .htaccess to FileServer htdocs folder.
When you make sure PHP files are forbidden, delete env.php
Executing php/cgi scripts on your server is potential vulnerability. Disable php,pl,cgi,py,sh,shtml extensions in your Site Settings.
INFO: To force file download for direct links (Save As popup in browser) you should have mod_headers Apache module enabled on your server.
Re: steps to transfer my site to another server?
1. create database dump (and then create new db on new server)hscorp wrote:what steps do i have to do to transfer my site to another server?
2. move all files from cgi-bin and htdocs to a new server
3. correct paths in configs on new server
-
- Posts: 10
- Joined: Jun 12, 2008 8:01 pm
Moving files
hey admin, how do you move files from old to new server ? i did the following php script, works great for small files but sucks with bigger ones (30 Mb+) due to php limitations i presume:
Notes:
- in the $SQL query you can target the user files you want
- $Source and $Destination as well as connection variables are just examples and need to be adjusted as per your actual data
- adjust and upload the script on your new host and run it from the browser
- finally : changing nameservers might take more than 12 hours to propagate!
i know php sucks so if anyone has a better idea please share!
Code: Select all
<?PHP
/* chlankboot.com */
$user_name = "XXXXX";
$password = "YYYYY";
$database = "ZZZZZ";
$server = "localhost";
$db_handle = mysql_connect($server, $user_name, $password);
$db_found = mysql_select_db($database, $db_handle);
if ($db_found) {
$SQL = "SELECT file_name, file_code, file_size FROM `Files`order by file_size";
$result = mysql_query($SQL);
while ($db_field = mysql_fetch_assoc($result)) {
print "Processing : " . $db_field['file_name'] . " - " . $db_field['file_code'] . " - Size : " . $db_field['file_size'] . "<BR>";
if (!file_exists($db_field['file_code']))
{
$Source = "http://www.your_old_domain.com/cgi-bin/uploads/00000/" . $db_field['file_code'];
$Destination = "/home/--------/public_html/cgi-bin/uploads/00000/" . $db_field['file_code'];
if (!copy($Source, $Destination)) { echo "La copie de $Destination n'a pas réussi...\n" . "<BR>"; } else { echo "OK..." . "<BR>"; };
};
}
mysql_close($db_handle);
}
else {
print "Database NOT Found ";
mysql_close($db_handle);
}
?>
- in the $SQL query you can target the user files you want
- $Source and $Destination as well as connection variables are just examples and need to be adjusted as per your actual data
- adjust and upload the script on your new host and run it from the browser
- finally : changing nameservers might take more than 12 hours to propagate!
i know php sucks so if anyone has a better idea please share!
-
- Posts: 10
- Joined: Jun 12, 2008 8:01 pm