Moving WordPress Site from MAMP to cPanel – How?

To answer your first question, in mosts hosts the www and public_html folders are the same, one just links to the other. To make things simple, start with the public_html folder. There is usually what is called a symlink between the two, pretty much like an alias or a shortcut.

Now for the second question on moving the site, perform approximately the following:

  1. Copy the entire contents of your local MAMP’s htdocs directory into the public_html folder on your host, most likely using an FTP program of some sort.
  2. In cPanel, you will need to create a new database to hold your site’s data. This again depends on the host and cPanel version/theme, but there is typically a database section on the home page that will let you create a new one. You will need to also create a new database user and password, and assign rights for that user to use the database you just made.
  3. Also look for phpMyAdmin in cPanel, and open in it up. On your local MAMP installation, go to http://localhost/MAMP/ and click on the phpMyAdmin link in the top menu bar. Open your database, and go to Export, click the “Go” button, and you should be left with a big huge textbox of SQL commands. Copy this entire section, go to your cPanel’s phpMyAdmin, find your database, click “SQL,” and paste in all of that text. Click “Go” and it will import almost all of your settings.
  4. Now you’ll need to tweak a couple of settings on your cPanel’s database. Find the wp_options table in phpMyAdmin, click Browse, and in the values look for anything that references the old site, like 127.0.0.1 or localhost, and change it to the proper address.
  5. Finally, you’ll need to change the database settings in your wp_config.php file, which should now be in your public_html folder. Open it up and find the database name, username, and password, and update it to reflect what you have in cPanel.

That is obviously a very general set of instructions, but it is the basic path that you would need to take. There are plenty of sites detailing moving a WordPress site, but it is always very particular and will always need to be adapted to your specific situation.

Google will be your friend on this, but here’s a couple to get you started:

Good luck!

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)