{"id":1920,"date":"2019-03-12T05:56:23","date_gmt":"2019-03-12T09:56:23","guid":{"rendered":"http:\/\/codinggorilla.com\/?p=1920"},"modified":"2019-03-12T10:17:59","modified_gmt":"2019-03-12T14:17:59","slug":"speeding-up-this-website","status":"publish","type":"post","link":"http:\/\/165.227.223.229\/index.php\/2019\/03\/12\/speeding-up-this-website\/","title":{"rendered":"Speeding up this website"},"content":{"rendered":"\n<p>A few months ago, I started to migrate some of my websites to DigitalOcean because the cost of a virtual server is $5\/mo. So, I moved CodingGorilla.com to the new host. (Note, a long story, but the name came from an old boss, who saw I have the patience of a saint and attention to minute details, the traits of any good programmer.)<\/p>\n\n\n\n<p>Unfortunately, the website has been painfully slow because I was told that you should keep your database and web server on separate hardware. This may be fine for large corps which have their servers on a fast LAN, but this was the wrong advice for a blog. I moved the MySQL database to the web server, and now the website works ~100x faster. Adage for the day: Believe half of what you see and nothing of what you hear.<\/p>\n\n\n\n<p>Incidentally, the tool which I used to find this problem is Query Monitor by John <g class=\"gr_ gr_4 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace\" id=\"4\" data-gr-id=\"4\">Blackbourn<\/g> (<a href=\"https:\/\/wordpress.org\/plugins\/query-monitor\/\">plugin page<\/a>, <a href=\"https:\/\/querymonitor.com\/\">website<\/a>). I <g class=\"gr_ gr_8 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace\" id=\"8\" data-gr-id=\"8\">flags<\/g> the slow queries, places the runtime for each query in a table, which you can then copy and paste into Excel to compute the total time required for the queries.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few months ago, I started to migrate some of my websites to DigitalOcean because the cost of a virtual server is $5\/mo. So, I moved CodingGorilla.com to the new host. (Note, a long story, but the name came from an old boss, who saw I have the patience of a saint and attention to &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/165.227.223.229\/index.php\/2019\/03\/12\/speeding-up-this-website\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Speeding up this website&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/posts\/1920"}],"collection":[{"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/comments?post=1920"}],"version-history":[{"count":0,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/posts\/1920\/revisions"}],"wp:attachment":[{"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/media?parent=1920"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/categories?post=1920"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/tags?post=1920"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}