Setting up WP locally then move it online?

19 replies
  • WEB DESIGN
  • |
I am planning to get my WP blog setup locally (offline) first before moving it online. Can someone please give me some guidelines on how I can move my blog 'online' (to web host) easily after?

Thank you
#locally #move #online #setting
  • Profile picture of the author geoffco23
    Hi. I'm assuming you're using XAMPP or similar to host your blog on your own machine. Go to your localhost Wordpress Dashboard and from there to Tools>Export. Choose 'All content' and save the XML file to your desktop.

    Now open your online Wordpress dashboard - you've installed Wordpress using Simple Scripts or whatever from your cPanel - and choose Tools>Import. Choose the Wordpress importer from among the ones listed, and follow the instructions to upload your XML file. Check your site online to make sure it worked. Then spend the rest of the day finding and fixing all the links in your posts that point back at your localhost version.
    {{ DiscussionBoard.errors[4808235].message }}
  • Profile picture of the author Istvan Horvath
    On the surface that's the "easiest" way.

    However, it is NOT perfect, and here is why (based on real life case study): I developed a blog like that locally with a nice theme that had many cool options. I played a lot with all those theme settings and options.

    Then I used Export tool (including uploads, images etc.) and imported the file into the fresh, empty WP install. Then I also uploaded the nice theme into the wp-content/themes/ folder via FTP. And activated the theme.

    Happily went to see my (supposedly) beautifully crafted blog and ... DANG! All my settings for the theme options were gone - I had to start to re-set them again.

    Lesson learned: the database contains not ONLY your content (posts, Pages, comments) but also LOTS of settings regarding your blog, your themes, your plugins.

    If you don't want to have them set again, do yourself a favour: use the phpMyadmin and export the whole database! Then import it using the same tool.

    You will have to change only 2 lines in the wp_options table:
    - home
    - site_url
    Signature

    {{ DiscussionBoard.errors[4808432].message }}
    • Profile picture of the author Seofarmer
      Thanks for the suggestions.
      To be frank, I havent put much thoughts about which offline panel to use. (or whatever you call it, XAMPP or whatever).

      Beside XAMPP, any other suggestions?
      Whats the most user-friendly and easiest one to operate?
      Do they look like cpanel where I can use simplescript to install WP on locally as well?

      Thanks again
      {{ DiscussionBoard.errors[4808929].message }}
    • Profile picture of the author rhinocl
      Originally Posted by Istvan Horvath View Post

      On the surface that's the "easiest" way.

      However, it is NOT perfect, and here is why (based on real life case study): I developed a blog like that locally with a nice theme that had many cool options. I played a lot with all those theme settings and options.

      Then I used Export tool (including uploads, images etc.) and imported the file into the fresh, empty WP install. Then I also uploaded the nice theme into the wp-content/themes/ folder via FTP. And activated the theme.

      Happily went to see my (supposedly) beautifully crafted blog and ... DANG! All my settings for the theme options were gone - I had to start to re-set them again.

      Lesson learned: the database contains not ONLY your content (posts, Pages, comments) but also LOTS of settings regarding your blog, your themes, your plugins.

      If you don't want to have them set again, do yourself a favour: use the phpMyadmin and export the whole database! Then import it using the same tool.

      You will have to change only 2 lines in the wp_options table:
      - home
      - site_url
      I did something similar and also had to reconfigure
      1) I installed WP on the new site
      2) I copied the WP folders from the old site to the new one using FTP
      3) I used tools|import
      Was I right except for the third step?
      {{ DiscussionBoard.errors[4893519].message }}
      • Profile picture of the author Istvan Horvath
        Originally Posted by rhinocl View Post

        I did something similar and also had to reconfigure
        1) I installed WP on the new site
        2) I copied the WP folders from the old site to the new one using FTP
        3) I used tools|import
        Was I right except for the third step?
        Most likely, yes.

        If instead of WP's export/import we backup directly the database and import the .sql file in phpMyadmin - no need to reconfigure anything.
        Signature

        {{ DiscussionBoard.errors[4893886].message }}
  • Profile picture of the author Istvan Horvath
    XAMPP is user friendly. Download the "with installer" version and follow the prompts.
    apache friends - xampp for windows

    It will create a folder named "xampp" on your C disk (hard drive)
    Inside it there is a folder "htdocs" - the equivalent of "public_html" in cPanel

    You will learn the manual install - which is a long term benefit even for your online adventures
    Signature

    {{ DiscussionBoard.errors[4809124].message }}
    • Profile picture of the author Seofarmer
      Originally Posted by Istvan Horvath View Post

      XAMPP is user friendly. Download the "with installer" version and follow the prompts.
      apache friends - xampp for windows

      It will create a folder named "xampp" on your C disk (hard drive)
      Inside it there is a folder "htdocs" - the equivalent of "public_html" in cPanel

      You will learn the manual install - which is a long term benefit even for your online adventures
      Thanks again.
      In that case, what about phpmyadmin, does Xampp offers that as well?
      Secondly, i dont want to bother you too much here, is there an accurate and clean guide somewhere online that I can follow on my own?

      Lastly, can you expand just a little on;

      "You will have to change only 2 lines in the wp_options table:
      - home
      - site_url"


      Thank you very much!
      {{ DiscussionBoard.errors[4813145].message }}
  • Profile picture of the author Istvan Horvath
    I am always happy to help... with the condition that people do their homework. Which means if I post a link I assume the help-seeker takes the time to click it and read the information there. When they ask back for information that was there on the linked page - it shows clearly they did NOT do their homework and my willingness to help goes down to zero.

    Sorry for being blunt but that's how it works.

    However, I will make a one-time exception:
    You asked how to set up WP locally, and I gave you the right tool. We all know that in order to "transform" your computer into a server able to run WP, you need to install Apache, MySQL and PHP, at least. Now, on that XAMPP page I linked to it says clearly - XAMPP is an easy [way] to install Apache distribution containing MySQL, PHP and Perl.

    There are other solutions, too, but I am the most familiar with XAMPP; I run it for years on my computers and I can guarantee it works.

    XAMPP auto-installs itself, just follow their instructions.

    WP installations should follow the detailed instructions - except you don't need FTP to upload the files... because after unzipping the WP package they are already on your machine, just need to place them in the right directory (htdocs).

    The creation of the MySQL database and the editing of the wp-config.php file is documented in many tutorials, videos etc.

    As for the two lines to be changed:
    in your wp-admin panel under Settings > General you have 2 fields:
    Wordpress address (URL)
    Site address (URL)
    - In a local installation you will there http://localhost/something/

    When you move your blog from the local machine to example.com > you will need to edit those two lines in the database to reflect the new location.

    Lots of good tutorials on this site: WordPress Help - Podz @ Tamba2
    Signature

    {{ DiscussionBoard.errors[4813948].message }}
  • Profile picture of the author geoffco23
    Hi again. If you check out this link: Install WordPress locally using XAMPP ...you'll find my article about how to install Wordpress locally using XAMPP. Incidentally, I'm letting the site die next year, so if you want to keep the article for reference, you'd better copy it.
    {{ DiscussionBoard.errors[4823066].message }}
  • Profile picture of the author JustMago
    I personally prefer WAMP, you can switch between PHP/Apache/MySql versions, and because it has a 64-bit version available. Xampp was the first one I ever used, but I haven't looked back ever since I started using WAMP.

    Lastly, can you expand just a little on;

    "You will have to change only 2 lines in the wp_options table:
    - home
    - site_url"
    If you want to move your site with the theme settings, plugin settings and everything, take a backup of the database tables(not the database), upload your wordpress files from your local installation to your hosting account, make a database in the hosting account, modify config.php to reflect the changes, import the database backup from the local installation, and modify those two fields in the database table named wp_options so that your site works.

    Step by step:
    1. Install wordpress on hosting account
    2. Replace the wordpress installation with the one on your localhost, EXCEPT the config.php file
    3. Take a database tables backup on your localhost
    4. Drop all tables on your hosting account wordpress database
    5. Import the database tables backup that you took in point 3.
    6. Go to wp_options, and edit the two fields named "home" and "site_url" so that your site functions properly.

    VOILA! MAGIC!

    If you still have some problems feel free to PM me (and i'll respond after I get 50 posts), or post here, your choice.
    {{ DiscussionBoard.errors[4823449].message }}
    • Profile picture of the author andrejvasso
      Originally Posted by JustMago View Post

      I personally prefer WAMP, you can switch between PHP/Apache/MySql versions, and because it has a 64-bit version available. Xampp was the first one I ever used, but I haven't looked back ever since I started using WAMP.
      They are the same.... Only difference is that WAMP is for windows, while XAMPP usually runs on linux and it supports perl.

      WAMP : Windows, Apache, MySQL, PHP

      XAMPP: X(for variable OS - usually its LINUX), Apache, MySQL, PHP, Perl
      {{ DiscussionBoard.errors[4832590].message }}
  • Profile picture of the author Danny Turner
    For building wp sites locally
    I use
    Features | Instant WordPress
    - It's free to use - pay for the manual to do a transfer
    is geek free - plugnplay
    can store all your plugins and templates .... cool
    stores on a usb - very handy - an instant wordpress site with all my premium plugins
    and themes avaiable on my keyring - keyring size USB's ... mmmmmmmmmmmm
    then use a clone software to move it

    download page
    Download | Instant WordPress
    {{ DiscussionBoard.errors[4831111].message }}
    • Profile picture of the author Kosten
      Thank Danny for your post , this is exactly what I was looking for and more
      Regards
      Jean-Claude
      {{ DiscussionBoard.errors[4898941].message }}
  • Profile picture of the author vServer Center
    Invest a little money in DirectAdmin control panel will save you a lot time and make migration much easier. DirectAdmin is similar to cPanel but much cheaper. With DirectAdmin, moving WP and many other applications is just a simple "backup" and "restore".
    {{ DiscussionBoard.errors[4894880].message }}
    • Profile picture of the author Istvan Horvath
      Originally Posted by vServer Center View Post

      Invest a little money in DirectAdmin control panel
      You are "targeting" the wrong population here (and in other replies of yours).
      We are NOT web host owners, just simple internet users
      Signature

      {{ DiscussionBoard.errors[4894917].message }}
  • Profile picture of the author TheInternet
    And migrating using SQL dumps is good practice for the regular backups you should be making.

    There are DB dump plugins for WordPress, but you're depending on the plugin being reliable when phpMyAdmin is a mature project with years of bugfixing past any plugin you might find for WP.
    Signature
    Free Guide (seriously; no upsells): Legit ways to make money online
    {{ DiscussionBoard.errors[4898999].message }}
  • Profile picture of the author abrahamgpg
    I just want to thank Istvan for his input and great wisdom.

    I am currently designing a wordpress website for our church using xampp and the tip for porting it to the web will come in handy within the next month.
    Signature
    Live each day as if it are your last day.

    Online Marketing Tips at Abraham's Tips.com.
    Marketers need to be trustworthy.
    Get your TRUST verified SEAL here.
    {{ DiscussionBoard.errors[4962843].message }}

Trending Topics