1

I have successfully uploaded my localhost wordpress site to a live server and everything works great. I have however needed to make some changes to the site and I did so on my localhost.

How can I upload the changes to the live server or do I have to re-upload all the files again and recreate the database etc. That seems like a seriously long way around and surely there must be a more elegant and quicker solution?

  • What changes exactly did you make? – Brad Dalton Nov 30 '14 at 10:31
  • Specifically, what kind of change, content? Files? – Tom J Nowell Nov 30 '14 at 14:17
  • I had an existing page that was blank. All I did was add text content to it and some icons. – Jonathan Nov 30 '14 at 14:24
0
  • If you make a change on a page using Wordpress itself (not using the "Appearance > Editor"), these changes will be stored in the mysql database. To move this over to your live wordpress, you will need to move your local database over to your live database.**

  • If you only make a change directly under a theme, lets say you make a new button or change the color of links in the stylesheet.css file (or generally use the "Appearance > Editor"). Then you need to move/replace the existing files on your live wordpress server with the newly changed files on your local wordpress server.***

** Moving a local wordpress database server over to a live wordpress database server may result in loss of pages/posts/comments made by other people using your live wordpress server.

*** You can use a version-control system as git to have control over your local wordpress system and your live wordpress system, this way you can keep track of what you change, and implement it with ease to your live wordpress system.

It is possible to have a wordpress development environment but you are limited to knowing exactly what you changed (especially on the database side) and it can be troublesome to implement it to the live wordpress environment.

  • Thanks for your response. I have looked at GIT but can't find an easy tutorial. It starts by saying you need to type in some command but I have no idea where you would actually type that command in. Are you able to explain in a very simple sentence what GIT actually does? Thank you – Jonathan Dec 1 '14 at 5:31
  • Git might be complicated in the start, but once you get to know it better - it will become your best friend (or at least a friend as close as Google). You can follow this tutorial (interactive), and get to know what it does: codeschool.com/courses/try-git – Rubatharisan Thirumathyam Dec 1 '14 at 12:32
0

To change any front-end functionality you can change the active theme only. In that case uploading/replacing only the theme (theme folder) will solve the issue.

If you changed any or your plugins, then uploading/replacing only the plugin (plugin folder) will solve the issue.

But if you uploaded an image, added/edited a post/page/media etc. then it's a database change. In that case it's a bit critical:

  • If, except the new changes all other things are same in both local and server, then you have to upload only the updates. You have to upload the /uploads/* folder and have to replace the server database with the recent local one.
  • If, you did some changes in your server also, and then you made some local database changes and both the versions are not same, then I'm afraid, it'd be a massacre. You have to update your server database one by one, only with the fresh changes.

That's the brief.

EDIT

Okay, after your comment:

OKay, what I did was add some text content to another page that was blank so that means I would have to upload the upload folder and replace the database. With regards to the database, do I have to completely delete the database on the server and upload the modified localhost one? If I did that wouldn't it change all the links again in the database i.e.: all the links would be the localhost ones again..

Have a look at this WPSE thread.
And no need to upload the whole database, just delete all the tables of your server database, and changing the server path, export and then upload the local tables into server db. :)

  • OKay, what I did was add some text content to another page that was blank so that means I would have to upload the upload folder and replace the database. With regards to the database, do I have to completely delete the database on the server and upload the modified localhost one? If I did that wouldn't it change all the links again in the database i.e.: all the links would be the localhost ones again.. – Jonathan Nov 30 '14 at 13:54
  • @Jonathan I edited my answer. :) – Mayeenul Islam Dec 1 '14 at 3:38
  • Thanks for your response. If I add the tables again from localhost to live server, doesn't that mess up all the paths and nothing will work? – Jonathan Dec 1 '14 at 5:32
  • You din't followed my link. The answer is there. You have to replace the server path with the local. :( – Mayeenul Islam Dec 1 '14 at 5:51

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.