{"id":930,"date":"2006-02-05T20:13:03","date_gmt":"2006-02-06T00:13:03","guid":{"rendered":"http:\/\/www.hoogervorst.ca\/arthur\/?p=930"},"modified":"2006-08-02T20:31:26","modified_gmt":"2006-08-02T23:31:26","slug":"local-wordpress","status":"publish","type":"post","link":"http:\/\/www.hoogervorst.ca\/arthur\/?p=930","title":{"rendered":"Local WordPress"},"content":{"rendered":"<p><span class=\"dropcap\">A<\/span> quick guide to help you develop your &#8216;online site&#8217; offline. Requirements:\n<\/p>\n<ul>\n<li>An offsite test server, preferably running Debian Stable (formerly &#8216;Sarge&#8217;).\n<\/li>\n<li>A good knowledge of MySQL, PHP and Bash\n<\/li>\n<li>Shell access to your online site.\n<\/li>\n<\/ul>\n<p>Proceed with the following steps:<\/p>\n<ol>\n<li>Create a tarfile that contains all the files on your server, including graphics, themes and that.\n<\/li>\n<li>Create a mysql dump of the WordPress database that holds your blog data.\n<\/li>\n<li>Copy these back to your local server (scp\/ftp)\n<\/li>\n<li>Create the same user\/password\/database on your local MySQL server. Check your wp-config.php file.\n<\/li>\n<li>Untar the backup file. Use the same base directory, if possible. If your blog was at \/arthur, you may just as well add a new directory \/arthur in your local webserver&#8217;s document root.\n<\/li>\n<li>Untar the SQL backup file. Import this in the database you created before. Grant access to the database for the newly created user. Warning: you may end up editing the SQL dump if you work on two different versions of MySQL. Additionally, using PhpMyAdmin for making dumps will generally not work thanks to the &#8216;magic quotes&#8217; problem. And hey, since you&#8217;re a professional, you may just as well bite the bullet and work on your commandline skills.\n<\/li>\n<li>You need to change a couple of WP options in your local WordPress database: most likely:<br \/>\n<code><br \/>\nUPDATE wp_options SET<br \/>\noption_value= 'http:\/\/192.168.1.20\/dude\/wordpress'<br \/>\nwhere option_name='siteurl';<br \/>\nUPDATE wp_options SET<br \/>\noption_value= '\/var\/www\/dude\/wordpress\/wp-content'<br \/>\nwhere option_name='fileupload_realpath';<br \/>\nUPDATE wp_options SET<br \/>\noption_value= 'http:\/\/192.168.1.20\/dude\/wordpress\/wp-content'<br \/>\nWHERE option_name='fileupload_url';<br \/>\nUPDATE wp_options SET<br \/>\noption_value= 'http:\/\/192.168.1.20\/dude'<br \/>\nwhere option_name='home';<br \/>\n<\/code>Choose the IP address of your liking.<\/li>\n<li>Consider upgrading to the latest WordPress version. Since you&#8217;re local copy is almost working, do so.\n<\/li>\n<li>Consider install PHPXRef.\n<\/li>\n<li>Point the database server to the local server in the wp-config.php file. Don&#8217;t forget this.<\/li>\n<li>Log in to your local WordPress using the right user\/password. Test the configuration.\n<\/li>\n<li>Set!\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>A quick guide to help you develop your &#8216;online site&#8217; offline. Requirements: An offsite test server, preferably running Debian Stable (formerly &#8216;Sarge&#8217;). A good knowledge of MySQL, PHP and Bash Shell access to your online site. Proceed with the following &hellip; <a href=\"http:\/\/www.hoogervorst.ca\/arthur\/?p=930\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts\/930"}],"collection":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=930"}],"version-history":[{"count":0,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts\/930\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=930"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=930"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=930"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}