Go Premium for a chance to win a PS4. Enter to Win


WordPress on local PC and hosted

Posted on 2015-02-05
Medium Priority
Last Modified: 2015-02-12
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)
Question by:hindersaliva
  • 4
  • 3
  • 2
  • +2
LVL 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 500 total points
ID: 40592562
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.

Author Comment

ID: 40592623
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?
LVL 84

Expert Comment

by:Dave Baldwin
ID: 40592685
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.
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

LVL 18

Accepted Solution

Lucas Bishop earned 500 total points
ID: 40593056
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.
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 500 total points
ID: 40595033
What Lucas said, plus not attempting to use Dreamweaver :)
LVL 84

Expert Comment

by:Dave Baldwin
ID: 40595065
Oh, I missed that part.  No Dreamweaver.  It was never made to cope with something like Wordpress.

Author Comment

ID: 40595280
Ah I see about Dreamweaver:) What would be a good web authoring tool for tweeking WordPress?
LVL 18

Expert Comment

by:Lucas Bishop
ID: 40595283
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.
LVL 84

Expert Comment

by:Dave Baldwin
ID: 40595308
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.

Assisted Solution

by:Alicia St Rose
Alicia St Rose earned 500 total points
ID: 40595312
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!

Author Comment

ID: 40606333
Thanks everyone. I'm better educated now thanks to you.

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how a content item can be identified directly or through translation of a navigation type. It then shows how this information can be used to create a menu for further navigation.
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
This video teaches users how to migrate an existing Wordpress website to a new domain.
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question