Solved

WordPress on local PC and hosted

Posted on 2015-02-05
11
146 Views
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)
0
Comment
Question by:hindersaliva
  • 4
  • 3
  • 2
  • +2
11 Comments
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 125 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.
0
 

Author Comment

by:hindersaliva
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?
0
 
LVL 83

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.
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 17

Accepted Solution

by:
Lucas Bishop earned 125 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.
0
 
LVL 70

Assisted Solution

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

Expert Comment

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

Author Comment

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

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.
0
 
LVL 83

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.
0
 
LVL 7

Assisted Solution

by:Alicia St Rose
Alicia St Rose earned 125 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!
0
 

Author Comment

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

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Wordpress update causing pages to crash 1 36
Cannot access my wp-admin account 2 17
help squeezing some space out in this site 9 34
Upload memory limit WordPress GoDaddy 8 27
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.
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. 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 : Open Page or Post…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

831 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