Alright, finally we’re going to finish transferring Joomla! from MAMP to your remote servers at your web host. This is advanced stuff that I’m walking you through, and it’s not as hard as you may think so bear with me. Let’s go!
Start MAMP. When your MAMP start page opens up, hit phpMyAdmin on the top navigation bar (we went over this in Step 2). If you already have MAMP open but the start page isn’t up, go to MAMP and hit the “Open Start Page’ button. What we’re going to do now is export our local Joomla! database. From the left-hand panel, click on the database you used to install Joomla!.
You should see all kinds of table entries come up now. Anything with the prefix ‘bak’ is a backup file. Your normal files will be prefixed with the table prefix you created when installing Joomla!. Regardless, just to be safe, we’re going to copy all of it. Above the table items click on ‘Export’ (take note of the ‘Import’ button, we’ll be using that later).
Numbered in the image are the steps for exporting your database:
- Select Items (hit ‘Select All’)
- MAKE SURE you have the type set to SQL
- Settings (SELECT ‘Save as File’, ignore compression, give it a file name template that you can easily find in your downloads)
- Hit ‘Go’!
Your file will download to your default download folder, with the suffix ‘.sql’. Locate that file, make sure you know where it is, and then we can move into your web host’s phpMyAdmin interface (again, I’m using DreamHost.com for my hosting). You should be able to access this by typing mysql.(your_domain).com into your URL bar (you’ll need your server credentials to access it). Now you’ll notice that it’s not too different from the MAMP phpMyAdmin. Now we’re going to click in the left-hand panel on the database we created in Step 4. Notice that there’s no table data here! We’re going to change that.
Click on ‘Import’, then:
- Choose your downloaded export file
- Ignore everything else and hit ‘Go’!
It will work for a while, then you should get a green bar confirming success. Now, if you haven’t already, you can upload your files using FileZilla as laid out in Step 4. Once your FTP files and your SQL database are online, you will almost have your website back. There is one more very important thing to do though: manually updating the configuration.php file. Without this final step, your website will fail to display content.
Open FileZilla and connect to your FTP server. In the server navigation panels, find the file ‘configuration.php’, which should be placed directly inside the directory into which you copied your Joomla! installation files. Now, in the local file navigation panels, navigate to a folder (such as ‘Downloads’ on Mac) that you can find easily. Double-click the configuration file to transfer a copy to your local machine.
Now open that file in a simple text editor, since I’m on a Mac I’m going to use TextEdit. In the image on the right I’ve highlighted what we need to change. Notice that in this file there is data matching your MAMP database configuration. We’re going to change:
- $host – from ‘localhost’ to ‘mysql.(yourdomain).com’
- $user – from ‘root’ to your server username
- $password – from ‘root’ to your server password
- $db – from your MAMP database name to the name of the database you just copied over to
Now, and this is important, we’re going to leave $dbprefix alone. By pointing the configuration file to the new database but the same table prefix, we’ve almost finished moving to the remote server. Please check out this article for one more step (you’ll see some stuff I’ve covered here) that is crucial to being able to update Joomla! in the future. Save the file, then go back into FileZilla and upload the modified configuration.php to it’s original location, choosing to overwrite when prompted. Check your website, and you should be done! Your website should now display as it did using the MAMP server for development.
So now I’ll conclude this tutorial series by saying this: Joomla! is a very powerful content management system, and using free tools like MAMP and FileZilla, combined with your web host (I recommend DreamHost.com), you can have an awesome looking website like mine! If you have any questions about what we’ve covered here, please comment on this post! Not only will it help answer your questions, but also the questions of other readers.
As a final thought, if you’re trying to choose a web hosting service, you really should consider DreamHost.com. Using the promo code JOOMLA25_SPP you’ll get $20 off one pre-paid year of hosting ($99.40/yr, $8.28/mo) OR $30 off two pre-paid years of hosting ($92.40/yr, $7.70/mo). Using the code will get you a discount and me some affiliate revenue, so if you liked this tutorial series, don’t be afraid to take advantage of the promo code – it’s a win-win! Thanks for reading.
Posts in this tutorial series:
Step 5: Remote Servers, Part 2
Step 4: Remote Servers, Part 1
Step 3: Exploring Joomla!
Step 2: Installation
Step 1: Setup