Need Advice? CALL: +61 417949565

Riksi - web design and development

  • Home
  • ABOUT US
  • OUR WORK
  • BLOG
  • CONTACT US
  • Home
  • BLOG
  • General
  • Migrate WordPress server from Local to Live

Migrate WordPress server from Local to Live

Migrate WordPress server from Local to Live

Editing WordPress theme on localhost is very easy and fast, but it’s getting tricky if you want to move your site’s database from the local environment to live server.

Here is 4 step you need to follow:

  1. Move all file to live server.
  2. Move local database to live mySQL
  3. Change database details in wp-congig.php file
  4. Run the script bellow to change all localhost text with new site url.
1
2
3
4
5
6
7
 
 
UPDATE wp_options SET option_value = replace(option_value, 'localhost', 'www.newsite.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'localhost','www.newsite.com');
UPDATE wp_posts SET post_content = replace(post_content, 'localhost', 'www.newsite.com');
 
 

Alternatively, you can use the tools like “Search and Replace for WordPress” to do more advanced things such as perform dry-run and replace serialised data.

Download the latest version:

https://github.com/interconnectit/Search-Replace-DB

Creator:
https://interconnectit.com/search-and-replace-for-wordpress-databases/

Tagged under: mysql, wp
Nick
Sunday, 07 February 2016 / Published in General, MySQL, PHP, Web developing, Wordpress

What you can read next

Remove illigal character in mysql string
Complete Guide to setup remote Git on your site
Show WordPress Page Content in Another Post Template

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Archive

  • General
    • Smart Home
  • Web developing
    • command line
    • CSS
    • General
    • git
    • Javascript
    • Laravel
    • Magento
    • MySQL
    • PHP
    • Security
    • Shopify
    • Wordpress

Recent Posts

  • Install HomeAssistant on Raspberry pi

  • Shopify ERR_INVALID_ARG_TYPE Error

Riksi

Riksi is a creative, professional & cutting-edge custom web design and development company.

HERE TO HELP

  • BLOG
  • Contact Us
  • Our Work
  • About Us

New on Blog

  • Install HomeAssistant on Raspberry pi

    To install it, We need to connect the SD card t...
  • Shopify ERR_INVALID_ARG_TYPE Error

    fix the Internal Server Error occurred while in...

GET IN TOUCH

T: (+61) 417 949 565
Email: [email protected]

Contact Us
Fill out the form and our team will be in touch with you promptly. Thank you for your interest!

AU & NZ
T: (+613) 9014 9495
T: (+61) 417 949 565
Email: [email protected]


US & Canada
Email: [email protected]

NAME

EMAIL

PROJECT TYPE
PROJECT BUDGET

MESSAGE

Could not authenticate you.

Whats on Instagram

Loading...

Tags

.htaccess calculation cherry pick composer content css deployer documentation error flex general knowledge get started git git stash hack javascript log mysql package password php PHP Trick replace scss shopify sidebar ssh symlink sync trick ubuntu windows 10 wordpress trick wp
  • GET SOCIAL
Riksi - web design and development

© 2020 All rights reserved. Riksi.com.

TOP