{"id":313,"date":"2012-06-01T11:58:59","date_gmt":"2012-06-01T15:58:59","guid":{"rendered":"http:\/\/rajdude.com\/blog\/?p=313"},"modified":"2012-06-01T15:42:26","modified_gmt":"2012-06-01T19:42:26","slug":"troubleshooting-copying-wordpress-to-another-domain","status":"publish","type":"post","link":"https:\/\/rajdude.com\/blog\/troubleshooting-copying-wordpress-to-another-domain\/","title":{"rendered":"Troubleshooting copying WordPress to another domain"},"content":{"rendered":"<p>I was moving a prod wordpress blog to a dev environment for development work. I have been following <a href=\"http:\/\/codex.wordpress.org\/Moving_WordPress\" target=\"_blank\">these instructions.<\/a><\/p>\n<p>The domain name is going to change. I have edited the wp-config.php file with the new names and database credentials. However, I keep getting the same error over and over again:<\/p>\n<h1>Error establishing database connection<\/h1>\n<p>I have been troubleshooting this for 2 days now. I now suspect that the database needs to be changed in some way. I faintly remember that the last time I moved a wordpress blog to a different domain&#8230; I had to run some kind of database cleanup script. Hmmmm&#8230;where was that information \ud83d\ude41<\/p>\n<p>got it ! <a href=\"http:\/\/interconnectit.com\/124\/search-and-replace-for-wordpress-databases\/\" target=\"_blank\">here is the script<\/a> we are supposed to run. I uploaded this script to the \/var\/www\/blog directory and called the script from a web browser.<\/p>\n<p>&nbsp;<\/p>\n<p>WOOO HOOO ! \ud83d\ude42<\/p>\n<p>This was the mssing link&#8230;the blog is working now.<\/p>\n<p>However there is one issue&#8230;it seems like only the text is being shown on the blog. The theme is\u00a0 not being applied.<\/p>\n<p>Also, only the main page is working&#8230;all the links are dead. I remember the solution to this second problem was to reset the permalink settings in WordPress&#8217; dashboard.<\/p>\n<p>&nbsp;<\/p>\n<p>I notice that all the links are HTTPS because the prod site runs HTTPS&#8230;&#8230;.the dev does\u00a0 not have a cert. So lets install a cert on the Apache web server. Easy enough. <a href=\"http:\/\/www.digicert.com\/ssl-certificate-installation-apache.htm\" target=\"_blank\">Here<\/a> are some simple instructions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was moving a prod wordpress blog to a dev environment for development work. I have been following these instructions. The domain name is going to change. I have edited the wp-config.php file with the new names and database credentials. However, I keep getting the same error over and over again: Error establishing database connection I have been troubleshooting this for 2 days now. I now suspect that the database needs to be changed in some way. I faintly remember that the last time I moved a wordpress blog to a different domain&#8230; I had to run some kind of database cleanup script. Hmmmm&#8230;where was that information \ud83d\ude41 got it ! here is the script we are supposed to run. I uploaded this script to the \/var\/www\/blog directory and called the script from a web browser. &nbsp; WOOO HOOO ! \ud83d\ude42 This was the mssing link&#8230;the blog is working now. However there is one issue&#8230;it seems like only the text is being shown on the blog. The theme is\u00a0 not being applied. Also, only the main page is working&#8230;all the links are dead. I remember the solution to this second problem was to reset the permalink settings in WordPress&#8217; dashboard. &nbsp; I notice that all the links are HTTPS because the prod site runs HTTPS&#8230;&#8230;.the dev does\u00a0 not have a cert. So lets install a cert on the Apache web server. Easy enough. Here are some simple instructions.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[29,36],"class_list":["post-313","post","type-post","status-publish","format-standard","hentry","category-itsys","tag-system-administration","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/rajdude.com\/blog\/wp-json\/wp\/v2\/posts\/313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rajdude.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rajdude.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rajdude.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rajdude.com\/blog\/wp-json\/wp\/v2\/comments?post=313"}],"version-history":[{"count":8,"href":"https:\/\/rajdude.com\/blog\/wp-json\/wp\/v2\/posts\/313\/revisions"}],"predecessor-version":[{"id":315,"href":"https:\/\/rajdude.com\/blog\/wp-json\/wp\/v2\/posts\/313\/revisions\/315"}],"wp:attachment":[{"href":"https:\/\/rajdude.com\/blog\/wp-json\/wp\/v2\/media?parent=313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rajdude.com\/blog\/wp-json\/wp\/v2\/categories?post=313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rajdude.com\/blog\/wp-json\/wp\/v2\/tags?post=313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}