Change domain name for a multi site
I was having problems because I was making a copy of the original site and then updating the code in the copy. For some reason the code was not copying properly. The databases were also not exporting properly from PHPmyadmin.

This is how I fixed it:


My site was in hosting that had Cpanel. So using Cpanel I made an archive of the site. I then downloaded the archive, renamed it and then uploaded to create a new copy of the site. This copy was a perfect replica of the original, so it had no problems.
For the databases, I used this command to export them via mysql in the command line:

mysqldump -u DATABASEUSER -p'PASSWORD' DATABASENAME > dump.sql 


In this command, you mustn't have a space after -p. So your command might look like this:

mysqldump -u host_mary -p'pass123' marywebsite &gt; dump.sql 



I then created new databases.
Finally, I imported the code into the new databases using this command

mysql -u DATABASEUSER -p'PASSWORD' DATABASENAME &lt; dump.sql