Joomla MAMP

FIVE: Getting That Live Site Export Into Your Localmachine Site

The following article was originally published 15 June 2017. Both MAMP and Joomla versions have both advanced since then but the basic fundamentals of using MAMP and Joomla remain the same to this day.

 

mysql

This is Part 5 of Web Development On Your Macintosh Computer Using MAMP and Joomla! CMS

You already have Joomla! installed in your MAMP environment including any custom templates that your sever site is using. This is important because if your site uses a custom template the SQL information is going to be looking for that custom template to put its information into.

Now it's time to import this SQL file into your local site. Launch your MAMP application. When it is running, your web browser goes to the 'Welcome to MAMP' page. Click on the link that says 'phpMyAdmin' at the top. This is now becoming a familiar looking page to you. On the left side under the heading 'Database' select from the drop down menu your Joomla! database. The page refreshes and you are looking at a page of the tables names with the 'jos_' prefix. In order for you to import the tables from the live site you will need to 'Drop' the existing tables in the Database. You could do an export of the localmachine DB first if you like so that you can restore it later if you wish, but we are trying to import the live server site database so that everything looks the same on the localmachine as it does on the live site. So we have to drop the current tables in order to import the new tables exported from the server. So along the top menu links is the 'Drop' link at the right side. Click that. You will get a dialog box asking you if you are sure you want to 'DESTROY' a complete database!' Click 'OK'. When the page refreshes, your localmachine database is gone. Now you need to recreate a new blank database in your localmachine site to import the tables exported from the live site. Don't worry, this will only take a couple of seconds.

Article continues below...

Do you need help for your Joomla website?

We offer Joomla training and teach Joomla best practices so you get the most out of your website.

We also provide Joomla optimized web hosting with site security, website monitoring, maintenance and updates.

Click the 'Request Joomla Help' button and fill out the request form.

This is an optional Step:

Click on the top 'phpMyAdmin' link again and in the middle of the page where it says 'Create new database' type in the name of the database. By naming it the same as the server database the exported files, when imported, will populate the localmachine database with all its tables and data. Got the name in there? You'll see a drop down menu beside it with 'Collation'. Leave it set there then click the 'Create' button right below.

You have created the empty database and now you are on a page that says there are 'No tables found in database'. That's OK, your import will fill this database with it's tables and data.

Now you want to click on the link along the top that says 'Import'. The page refreshes and then you will see a 'Choose File' button in the 'File to import' area in the main body. Click that button and navigate to the file on your hard drive that you exported from your server site. Once selected and you clicked 'OK' in the dialog box the page refreshes and now you see your file name beside that 'Choose File' button. A drop down menu right below that says 'Character set of the file: utf8' Leave it that way.

A button is selected at the bottom of the page underneath the heading 'The format of the imported file' as 'SQL'. Now is the time to click the 'Go' button at the bottom of the page. If all is well you will see 'Import has been successfully finished,' along with the number queries executed.

Your server database is now in your localhost machine. You should be able to go to a browser window and type in the URL 'http://localhost:8888/Joomla_1/' and see your localmachine site with your information in it. If you do not, or you get an error, then you may have to open the 'configuration.php' file in your MAMP environment Joomla! install and make sure that the database name, database user, and database password are all correct. If you have problems here we'll address this. You may have to set the permissions for the database username in your MAMP environment in order for the localmachine Joomla! to be able to access the tables. Otherwise if you are seeing your localmachine Joomla! home page with your information in it you are almost there!

BTW - don't get discouraged if all this seems a bit hard. The first time you do this might be a little difficult but the next time you sync your server with your localmachine site it will be a cinch.

At this point my information is showing on the localmachine site but the graphics and pictures are not the right ones. So the next step is to get those images from the server site over to the localmachine so everything looks the same.

Next: (Optional Step) Bringing Adobe GoLive Into The Mix