WordPress on local PC and hosted

I have installed WordPress locally on my PC to experiment/learn WordPress with Dreamweaver. Eventually my site will be on my hosting account.

Can someone confirm that ALL the content is on the MySQL database? So that if I export the database and import it online I will have EVERYTHING as on my local PC? (all the plugins and the theme will be the same)
hindersalivaAsked:
Who is Participating?
 
Lucas BishopConnect With a Mentor Click TrackerCommented:
It will be much easier to migrate, if you have your localhost setup to act as your main domain and your database name/user matches identically to your web host (assuming your web host has the database on the same server as the web site) and you use the same file structure.

So let's say your domain is "mydomain.com". You'll set up your local server to host this domain. You'll also setup your pc host-file to look at your localhost for this domain (instead of doing a dns lookup).  This way when you're configuring your Wordpress installation locally, all of the settings (except DB location potentially) will be an identical match to what you have on your web host.

When it comes time to migrate, you'll simply copy your db from the localhost to the web host. You'll copy the wordpress installation files/folders to the web host. You'll update your pc's host file to stop looking at the localhost for mydomain.com

If you end up running into any issues, they'd generally be confined to updating your wp-config.php file in the site root, to have correct database connection information.  The siteurl and home values in the database table "wp_options" (via phpadmin or whatever db editor your web host provides).  If you have permalinks configured, you'd need to disable on the new site and re-configure the htaccess file.
0
 
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
That's not quite true.  You do also need the theme files which are not in the database.  Actually you need all the files in your Wordpress directories because your configuration files are there too.

In addition, your database files will have to be edited because they contain the domain that Wordpress is installed on/in and that will have to be changed when you move it to your hosting account.
0
 
hindersalivaAuthor Commented:
Ok. That's what I feared. So I can experiment locally, but will need to replicate manually on the hosting account?

I'd be interested to hear how the experts do it. Work solely on the hosting account?
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
Dave BaldwinFixer of ProblemsCommented:
That's the way that most web site development works except for having to adjust the info in the database.  My Wordpress installs are just for testing and experimenting so I just work on them (rarely) on my hosting account.  Although I do have a complete back up on this machine.
0
 
Jason C. LevineConnect With a Mentor No oneCommented:
What Lucas said, plus not attempting to use Dreamweaver :)
0
 
Dave BaldwinFixer of ProblemsCommented:
Oh, I missed that part.  No Dreamweaver.  It was never made to cope with something like Wordpress.
0
 
hindersalivaAuthor Commented:
Ah I see about Dreamweaver:) What would be a good web authoring tool for tweeking WordPress?
0
 
Lucas BishopClick TrackerCommented:
I like to use firebug to edit css styles while viewing the live site. Once I get them exactly how I want them to look, then I copy them into the actual syle.css files.
0
 
Dave BaldwinFixer of ProblemsCommented:
What would be a good web authoring tool for tweeking WordPress?
Usually just a colorized code editor.  HTML-kit, Notepad++, PSPad, and several others.  The 'problem' with Wordpress and similar programs is that it takes many files to create a page.  And each file only does part of the code.  That's why it's so 'versatile' but also difficult for a "web authoring tool" to deal with.  If you allowed some of the 'automatic' features in Dreamweaver to operate, you could crash the whole site in no time.  

Many of the top PHP experts here do not use a "web authoring tool" because the automation provided often interferes with the code instead of helping it.  Just good code editors.
0
 
Alicia St RoseConnect With a Mentor Owner & Principle Developer/DesignerCommented:
I use Coda to edit any code files.
LiveReload to automatically reload my CSS edits
Nice plugin to add the necessary livereload script to your site: Live Reload Snippet Do not forget to DEACTIVATE and trash the plugin on the live remote site or it will slow it down to molasses!

I work on my local machine all of the time. I'm using Mamp to do so.

When I'm ready to migrate to remote server here are my steps:

1. FTP wp-content folder to remote server
2. Drop remote database
3. Import database from local machine
4. Go to SQL tab in phpMyAdmin
5. Slap in the following code (with your correct URL's):

UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');

UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');

UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');

Open in new window


You will be good to go!

I third: Bag the Dreamweaver!
0
 
hindersalivaAuthor Commented:
Thanks everyone. I'm better educated now thanks to you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.