?

Log in

 

Wordpress migration from dev to production - Web Developer

About Wordpress migration from dev to production

Previous Entry Wordpress migration from dev to production Sep. 2nd, 2013 @ 03:57 pm Next Entry
Hi,

I downloaded the Wordpress source files to my development environment, where I am playing around with new features and adding content.
Now that I have a better comfort level with Wordpress, I'd like to migrate my blog content to my production server through FTP.

I understand I also would have to migrate the database too, since that's where all my content is stored.

Should I go through the installation process on my production server, and then copy the modified databases over to production? Or should I just paste all of my PHP source files from dev into a new folder on my server and assume that things will work (I guess that is kind of a silly question?)

Is there anything I should be aware of when pasting the files in Production and logging into it? My biggest concern is while I am going through the installation again, someone else could be trying to go through the Wordpress files as I am configuring my blog environment for the first time.

I can't change the database names on my server, since it is going through a web hosting company, so perhaps it is better to go through the installation again in production, and then migrate the content from the databases.

Your help is greatly appreciated!

Thanks!
Leave a comment
[User Picture Icon]
From:plasticrapping
Date:September 3rd, 2013 03:46 am (UTC)
(Link)
First of all: Good on you for starting out with a local development environment. It's worth the performance gain for quick production.

Next up is deployment. Are you setup with a GIT repo?

I would personally do something like this for simple and easy to maintain deployment methdods:
(for the nerds surely to follow this, it's just simple and easy. Surely there is a superior method that would make you king of the developer circle jerk)


  • Setup your local site as a GIT repo.

  • Edit .gitignore to ensure you are ignoring the important stuff. No passwords should make it to a repo so pull out the config file. Ditch the user uploaded content too.

  • You can setup what RSA keys have access to the repo. You should be able to also setup deployment only keys (only pull, no push)

  • Clone the repo on production. Manually move over necessary user content (images, etc).

  • Move database. Be sure to edit all references to old website in wp-options table to new URL or things will break because wordpress isn' as portable as Drupal (BURN!)



Managing database level differences is all you however. Again, going for simplicity for a newer developer, I'd lock out administrative access on production while doing a serious push, pull down production DB and user content, do your work on staging, push out and then release access to the wp-admin interface.


I hope that helps.
[User Picture Icon]
From:plasticrapping
Date:September 3rd, 2013 03:48 am (UTC)
(Link)
(NOTE: If you're more interested in best practices than simple and easy for a first timer, let me know)
[User Picture Icon]
From:artemis2020
Date:September 3rd, 2013 03:01 pm (UTC)
(Link)
Sorry, total git noob here, lol

You said: "Edit .gitignore to ensure you are ignoring the important stuff. No passwords should make it to a repo so pull out the config file. Ditch the user uploaded content too."

Did you mean AREN'T ignoring the important stuff?
And please define "Important stuff" lol


[User Picture Icon]
From:plasticrapping
Date:September 5th, 2013 03:56 am (UTC)
(Link)
That read awkwardly I realize.

You really need to ignore a wide variety of important and unimportant files.

Primarily: Ignore user uploaded content, and ignore any files containing passwords (wp-config).

Arguably: Ignore core files and plugins (modules in drupal). This is questionable though since the source code and the database that travels with it will arguably be version dependent.
(Leave a comment)
Top of Page Powered by LiveJournal.com