Settings.php. I edited that file, replacing all references to the old domain name with references to the new domain name.
Settings.php file, you will see lines such as the
########## Forum Info ##########
$mbname = 'My Example Forum'; # The name of your forum.
$language = 'english'; # The default language file set for the forum.
$boardurl = 'http://olddomain.com/forum'; # URL to your forum's folder. (without the trailing /!)
$webmaster_email = 'firstname.lastname@example.org'; # Email address to send emails from. (like email@example.com.)
$cookiename = 'SMFCookie123'; # Name of the cookie to set for authentication.
I believe the cookiename could be the same, if the domain names differ, e.g. if I was changing from olddomain.com to newdomain.com, but should differ if you were running multiple forums under one domain name, instead of changing a domain name. I changed the number at the end of the cookiename value anyway, though.
I also made the appropriate changes in the
Settings.php, I also made sure that the values for the following variables in the
Database Infosection were set appropriately for the new website:
I had the value for
db_prefix be the same prefix for both
the new and old domains.
On the forum under the old domain, I backed up the database for the forum, by clicking on Admin, then selecting Maintenance, then Forum Maintenance, then Database. Under the Backup Database section, I left the following options checked:
I deselected the "Compress the file with gzip" option. I then clicked on the Download button and downloaded the .sql file to my laptop. That file contains a sequnce of Structured Query Language (SQL) statements that can be used to recreate all of the tables and their records for a database. All forum postings are contained within a database.
dos2unixcommand to set the line endings for the Linux system on which the new website resided.
olddomainin the .sql file I had downloaded with
newdomainto reflect that the domain name was now different.
$ mysql -u jane -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 271185 Server version: 5.0.77 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> use newdomaindb; mysql> source olddomain-complete_2011-07-30.sql; Query OK, 0 rows affected, 1 warning (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 7 rows affected (0.01 sec) Records: 7 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected, 1 warning (0.00 sec) Query OK, 0 rows affected (0.00 sec) <text snipped> Query OK, 5 rows affected (0.00 sec) Records: 5 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected, 1 warning (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 4 rows affected (0.00 sec) Records: 4 Duplicates: 0 Warnings: 0 mysql>
I saw some notices about warnings, but those were not worrisome since I expected to see those as a result of statements such as the following in the .sql file:
DROP TABLE IF EXISTS `smf_admin_info_files`;
Since there were no existing tables in the database, I would expect to see warnings produced from such statements.
Created: Sunday, July 31, 2011