Switching sql files between local and online hosts
Hi fellow WordPress experts.
I’m building online and locally (MAMP) hosted websites using a Mac. Ideally I’d like to be able to develop offline, then upload to the online host, or a further development area of my main site.
This is the method I’ve been using to get a website online.
The local sql files where saved using these details:
Add DROP TABLE / VIEW / PROCEDURE / FUNCTION
Add AUTO_INCREMENT value
Enclose table and field names with backquotes
Save as file: Compression: None
I then searched and changed all localhost references in the sql file to the online address.
I then changed the upload path below to the correct hosted address
wp_optionsVALUES(59, 0, ‘upload_path’, ‘/_THE UPLOAD PATH_/wp-content/uploads’, ‘yes’);
Next I imported the sql file to the hosted database.
Finally I manually uploaded the pictures into the online upload folder to relink them.
It seems to work. But my simple questions are:
1. Does this seem correct?
2. If it is, there a easier way of doing it?
Thanks for your time!
- The topic ‘Switching sql files between local and online hosts’ is closed to new replies.