Pages: [1]   Go Down
Send this topic | Print
Author Topic: How do I synchronize between a local and remote wordpress site?  (Read 563 times)
redbourn
Member
*
Offline Offline

Posts: 42


WWW
« on: December 12, 2008, 03:30:37 PM »

Hi,

I just set up word press locally and have a remote site which is working.

Let's say that I want to work locally on the one that's on 110mb, what do I need to download?

And vice versa, when I finish or create a new one locally then how what do i need upload?

Can I just contact my remote right now with something like Total Commander and say download and synchonize the whole site?

I am more concerned about the data base issue than anything else.

thanks in advance for any help,

Mike
Logged
shawn-stark
Hyper-Active Member
***
Offline Offline

Posts: 124


WWW
« Reply #1 on: December 12, 2008, 03:56:57 PM »

I had a similar problem, I added some
information out on the server and wanted
my local server to reflect this...

So I exported the db and presto
alakazam imported it localy..

Try to access it and What?? it
transfers me back to the server
I just copied the DB from, hmmm.?

Well wordpress must get the url
and place it in the database.

This was easy to fix, Opened
the db export in Visual Studio
and said replace yoursite.com\
with localhost\

Worked fine after that.

Logged
redbourn
Member
*
Offline Offline

Posts: 42


WWW
« Reply #2 on: December 12, 2008, 04:26:29 PM »

I had a similar problem, I added some
information out on the server and wanted
my local server to reflect this...

So I exported the db and presto
alakazam imported it localy..

Try to access it and What?? it
transfers me back to the server
I just copied the DB from, hmmm.?

Well wordpress must get the url
and place it in the database.

This was easy to fix, Opened
the db export in Visual Studio
and said replace yoursite.com\
with localhost\

Worked fine after that.



thanks - but which remote wordpress folders do I need to download?

My local version only has 'hello world'  smiley

I'll need themes and plug-ins for a start and what else?


Mike
Logged
Piotr GRD
Honoured 110MB Member
Official 110mb Guru
*****
Offline Offline

Posts: 6669



WWW
« Reply #3 on: December 12, 2008, 05:24:57 PM »

A MySQL database on a 110mb can be accessed only locally, only from the same 110mb server. So if you want to access your database on 110mb from your own computer or from some other server - it's not possible.

So you have to either use external (not 110mb) MySQL for both copies of wordpres (that MySQL have to allow for external connections), or update databases manually with using 110dbManager, PHPMyAdmin etc., or install on your account some additional script that will do it for you automatically (connect to your second database, download it and update entries on 110mb MySQL) - I don't know if any exists already.
Logged

redbourn
Member
*
Offline Offline

Posts: 42


WWW
« Reply #4 on: December 12, 2008, 09:49:46 PM »

A MySQL database on a 110mb can be accessed only locally, only from the same 110mb server. So if you want to access your database on 110mb from your own computer or from some other server - it's not possible.

So you have to either use external (not 110mb) MySQL for both copies of wordpres (that MySQL have to allow for external connections), or update databases manually with using 110dbManager, PHPMyAdmin etc., or install on your account some additional script that will do it for you automatically (connect to your second database, download it and update entries on 110mb MySQL) - I don't know if any exists already.


thanks for your help!

I never know - whether to top or bottom post?

Your post and shawn-stark's one appear to be in conflict.

It appears however that I can export a database from 110.mb

So what and what isn't possible?

Mike
Logged
Piotr GRD
Honoured 110MB Member
Official 110mb Guru
*****
Offline Offline

Posts: 6669



WWW
« Reply #5 on: December 12, 2008, 10:41:56 PM »

Yes, you can export database from 110mb. With using tools/scripts installed on 110mb - in example 110dbManager etc.
Yes, you can import it (like already did it) with using tools/scripts installed on 110mb.

What I thought that your "synchronize the whole site" is in your mind automatic synchronisation - whatever you do on one copy, it automatically appear on both of them. In this case you can not use 110mb MySQL, as it's not accepting remote (external) connections.

But if you are talking only about "synchronising from time to time" then of course you can do it manually with no problems.
I was read too fast - instead of each word - only most important keywords and phrases... Sorry.

What is what: all plugins, templates etc. are stored inside of the Wordpress files - so you can transfer them trough FTP. Inside of one of the files - wp-config.php there are stored MySQL details - this file will be different on both copies, as you're using different databases. The content of your Wordpress, users, pages, comments, all settings, URLs etc. are stored in the database. This you can import/export with using MySQL tools. It will be identical on both copies except of used URLs and paths to the files (ie. upload path).

So copying all files (except wp-config.php which have to be different) and exporting/importing database (with editing the URLs and paths) is enough to completely "clone" everything.
You have to remember about files and folders permissions to be set correctly. The files can be copied only once (except of adding some new template or new plugin). Database each time when you change something.
If you know what was changed and what is stored where (in which database table) then exporting/importing only selected table(s) of the database is enough.
« Last Edit: December 12, 2008, 10:49:37 PM by Piotr GRD » Logged

shawn-stark
Hyper-Active Member
***
Offline Offline

Posts: 124


WWW
« Reply #6 on: December 14, 2008, 12:26:22 PM »

doesn't make sense to me.
Don't you install and test the
plugins on the local machine prior
to installing them out on the
remote server??

Yeah, you would need a copy
of your wp-content folder.
Prolly wanna make sure your
connection string is right too.

Its kinda a bummer the 110db
manager doesn't offer an export.
I know its trouble uploading phpmyadmin

But I can't think that accessing the data
base to archive important information or
create an xml interface for data retrieval
is realy that bad.

http://scheduler.webgrid.com/default.aspx

Looking to modify the script found at the link below to
rotate backups in and out through son - father and grandpa
placing the date inside the file. Also add option at top to add
create and drop tables..  After class is out for christmas i'll do it
http://www.fluffycat.com/SQL-MySQL-Database-Backup-With-PHP/
« Last Edit: December 14, 2008, 06:49:51 PM by shawn-stark » Logged
Piotr GRD
Honoured 110MB Member
Official 110mb Guru
*****
Offline Offline

Posts: 6669



WWW
« Reply #7 on: December 14, 2008, 07:03:30 PM »

(...)
Its kinda a bummer the 110db
manager doesn't offer an export.
I know its trouble uploading phpmyadmin
(...)

Yes, 110dbManager offer exporting of the database. Show the tables, select them all, from the drop down menu "with selected - export".

Uploading PHPMyAdmin is not a problem - 5 minutes to install (or less).
Use version 2.x in here, 3.x is not working, it's require PHP 5.2+
Logged

shawn-stark
Hyper-Active Member
***
Offline Offline

Posts: 124


WWW
« Reply #8 on: December 15, 2008, 03:44:59 AM »

Oh, my eyes must have overlooked it.
Logged
Pages: [1]   Go Up
Send this topic | Print
Jump to: