0

A remote host is running Wordpress 3.6.1, and Wordpress needs to be upgraded.

The plan is to make a local copy, do the upgrade of files and database, confirm things work, and then publish this local copy to the remote server.

I've tried a few different methods.

The first was downloading a cPanel file backup + a cPanel database backup. I opened the .SQL file, and and replaced all instances of /home/username with c:\wamp\www\wordpress. The local Wordpress is served from c:\wamp\www\wordpress. After making an Apache vhost entry, and modifying Windows' hosts file, the site loads as www.example.com from localhost, but there are some differences in design to the remote copy.

One obvious difference is the logo is not set on the local development version, being HTML text, rather than a PNG image.

Another is that the locally served version of http://www.example.com/wp-content/plugins/ubermenu/styles/custom.css?ver=2.1.0.0 contains different CSS to the remote version.

So, I think it's clear the database settings are different.

My questions are:

  • Did replacing all instances of /home/username with c:\wamp\www\wordpress cause this problem?
  • If so, what should I replace /home/username with in the local .SQL file instead?
  • Is there a better method to get a copy of the remote database installed on the local development host? (preferably without requiring use of the Linux command line, which I am not strong with).

I've tried using WP Migrate DB, which I've had success with in the past, but on this remote host, I receive a 503 Service Unavailable error after about 40 seconds. I've tried increasing timeout setting, and disabling mod_security without making a difference.

Update: I've started from scratch, with the original 3.6.1 files and database, and didn't bother to do the search and replace in the SQL file this time, and the site is displaying fine locally now.

My next question is: do I need to do any more work on the database while in local development, given there are local database values with /home/username which doesn't reference the right location locally ?

1

Leave your database alone. Instead insert two lines in your wp-config.php on the local server:

define('WP_HOME','http://yourlocalserver/yoursite');
define('WP_SITEURL','http://yourlocalserver/yoursite');

The rest of what you are doing probably doesn't matter and editing the SQL export is prone to error so you could easily be breaking things.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.