{"id":958,"date":"2019-12-05T09:30:23","date_gmt":"2019-12-05T02:30:23","guid":{"rendered":"https:\/\/lab.wptips.dev\/?p=958"},"modified":"2020-06-21T09:47:01","modified_gmt":"2020-06-21T02:47:01","slug":"wamp-for-wordpress","status":"publish","type":"post","link":"https:\/\/pixelstudio.id\/blog\/wamp-for-wordpress\/","title":{"rendered":"How to Setup Local WordPress Development with WAMP"},"content":{"rendered":"\n<p>WAMP is a lightweight PHP Server for Windows. It&#8217;s not designed specially for WordPress so you need to do extra steps to make it work.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. Installation<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"372\" src=\"https:\/\/pixelstudio.id\/blog\/wp-content\/uploads\/2019\/12\/wamp-download.jpg\" alt=\"\" class=\"wp-image-998\" srcset=\"https:\/\/pixelstudio.id\/blog\/wp-content\/uploads\/2019\/12\/wamp-download.jpg 750w, https:\/\/pixelstudio.id\/blog\/wp-content\/uploads\/2019\/12\/wamp-download-480x238.jpg 480w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><figcaption>WAMP Homepage<\/figcaption><\/figure>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link has-background has-blue-background-color\" href=\"https:\/\/sourceforge.net\/projects\/wampserver\/\" target=\"_blank\" rel=\"noreferrer noopener\">Download WAMP<\/a><\/div>\n<\/div>\n\n\n\n<p>Always install it on the default directory (<code>C:\\wamp<\/code>) to avoid weird behavior in the future.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Set Database Password<\/h2>\n\n\n\n<p>By default the database has no password, but you need to have one for WordPress setup. Here&#8217;s how to add password:<\/p>\n\n\n\n<ol><li>Go to <code>localhost\/phpmyadmin<\/code> in your browser. Login using the username <code>root<\/code> and empty password.<\/li><li>Choose &#8220;User Accounts&#8221; tab then click &#8220;Edit Privileges&#8221; on <code>root<\/code> account (See picture below).<\/li><li>Inside, you will find &#8220;Change Password&#8221; box. Fill in and save. Done!<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"319\" src=\"https:\/\/pixelstudio.id\/blog\/wp-content\/uploads\/2019\/12\/wamp-add-password.jpg\" alt=\"\" class=\"wp-image-996\" srcset=\"https:\/\/pixelstudio.id\/blog\/wp-content\/uploads\/2019\/12\/wamp-add-password.jpg 750w, https:\/\/pixelstudio.id\/blog\/wp-content\/uploads\/2019\/12\/wamp-add-password-480x204.jpg 480w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><figcaption>Add Database password via PHPMyAdmin<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">3. Create an Empty Database<\/h2>\n\n\n\n<p>Still in PHPMyAdmin, click &#8220;Databases&#8221; tab then create a new database like shown in the picture below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"345\" src=\"https:\/\/pixelstudio.id\/blog\/wp-content\/uploads\/2019\/12\/wamp-create-db.jpg\" alt=\"\" class=\"wp-image-997\" srcset=\"https:\/\/pixelstudio.id\/blog\/wp-content\/uploads\/2019\/12\/wamp-create-db.jpg 750w, https:\/\/pixelstudio.id\/blog\/wp-content\/uploads\/2019\/12\/wamp-create-db-480x221.jpg 480w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><figcaption>Create a new database in WAMP<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">4. Download WordPress Core Files<\/h2>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\"Download the files (opens in a new tab)\" href=\"https:\/\/wordpress.org\/download\/\" target=\"_blank\">Download the files<\/a> and extract it to your empty project directory.<\/p>\n\n\n\n<p>If you have <strong>WP-CLI<\/strong> installed, simply type in the command <code>wp core download<\/code>. We will cover this topic soon.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">5. Create Virtual Host<\/h2>\n\n\n\n<p>Virtual Host is basically a fake domain name like <code>my-site.test<\/code> to mask our local project. Always use either <code>.local<\/code> or <code>.test<\/code> because those two are reserved for local testing and won&#8217;t be sold.<\/p>\n\n\n\n<p>Here&#8217;s how you create a Virtual Host in WAMP:<\/p>\n\n\n\n<ol><li>Go to <code>http:\/\/localhost\/add_vhost.php<\/code> in your browser.<\/li><li>Fill in the 1st field with your fake domain name and the 2nd field with your project&#8217;s directory. Then click &#8220;Start the creation&#8230;&#8221;.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"285\" src=\"https:\/\/pixelstudio.id\/blog\/wp-content\/uploads\/2019\/12\/wamp-virtual-host.jpg\" alt=\"\" class=\"wp-image-999\" srcset=\"https:\/\/pixelstudio.id\/blog\/wp-content\/uploads\/2019\/12\/wamp-virtual-host.jpg 750w, https:\/\/pixelstudio.id\/blog\/wp-content\/uploads\/2019\/12\/wamp-virtual-host-480x182.jpg 480w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><figcaption>Add a new Virtual Host in WAMP<\/figcaption><\/figure>\n\n\n\n<ol start=\"3\"><li>You need to restart DNS for the changes to apply. Right-click the WAMP tray icon &gt; Tools &gt; Restart DNS<\/li><li><strong>Done!<\/strong> Wait until the WAMP icon turns green and try going to the domain in your browser. You will be prompted with the WordPress installation page.<\/li><\/ol>\n\n\n\n<p>That&#8217;s it! Now you have a working WordPress site running in your Windows PC. You can start adding theme, plugins, etc.<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-dots\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>As a developer, you always have to develop your site locally first. It loads faster and if there&#8217;s a fatal error, it&#8217;s easier to fix.<\/p>\n\n\n\n<p>By following the guide above, you will have a PHP server running in your Windows using WAMP, which is the fastest and most lightweight one I have tested.<\/p>\n\n\n\n<p>If you prefer an instant solution, you can try <a rel=\"noreferrer noopener\" aria-label=\"Local by Flywheel (opens in a new tab)\" href=\"https:\/\/localbyflywheel.com\/\" target=\"_blank\">Local by Flywheel<\/a>. It&#8217;s an amazing tool but it slows down significantly when you run 2 or more sites at the same time.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>Feel free to ask in the comment below if you are stuck in any steps above \ud83d\ude42<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>WAMP is a lightweight and really fast PHP Server for Windows. It&#8217;s not designed specially for WordPress so you need to do extra steps to make it work.<\/p>\n","protected":false},"author":1,"featured_media":995,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[33],"class_list":["post-958","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general","tag-localhost"],"blocksy_meta":{"page_structure_type":"default","page_enable_vertical_spacing":"yes","has_hero_section":"default","hero_section":"type-1","hero_alignment1":"left","hero_alignment2":"center","hero_height":"230px","page_title_bg_type":"color","8007dd9de931304800ca3d6d5c1565db":"","custom_hero_background":{"attachment_id":null},"parallax":{"desktop":false,"tablet":false,"mobile":false},"c48b1e5bda81ce2d78483871996f45a4":"","single_meta_elements":{"author":true,"date":true,"categories":true,"comments":true,"updated":false,"tags":false},"has_meta_label":"yes","date_format_source":"custom","single_meta_date_format":"M j, Y","a228631dbfe2afa8001e2b7c8dc0063b":"","page_excerpt_visibility":{"desktop":true,"tablet":true,"mobile":false},"pageTitleFont":{"family":"Default","variation":"Default","size":{"desktop":"32px","tablet":"30px","mobile":"25px"},"line-height":"1.3","letter-spacing":"CT_CSS_SKIP_RULE","text-transform":"CT_CSS_SKIP_RULE","text-decoration":"CT_CSS_SKIP_RULE"},"pageTitleFontColor":{"default":{"color":"var(--paletteColor4)"}},"pageMetaFont":{"family":"Default","variation":"n6","size":{"desktop":"12px","tablet":"12px","mobile":"12px"},"line-height":"1.3","letter-spacing":"CT_CSS_SKIP_RULE","text-transform":"uppercase","text-decoration":"CT_CSS_SKIP_RULE"},"pageMetaFontColor":{"default":{"color":"CT_CSS_SKIP_RULEDEFAULT"},"hover":{"color":"CT_CSS_SKIP_RULEDEFAULT"}},"pageExcerptFont":{"family":"Default","variation":"n5","size":"CT_CSS_SKIP_RULE","line-height":"CT_CSS_SKIP_RULE.65","letter-spacing":"CT_CSS_SKIP_RULE","text-transform":"CT_CSS_SKIP_RULE","text-decoration":"CT_CSS_SKIP_RULE"},"pageExcerptColor":{"default":{"color":"CT_CSS_SKIP_RULEDEFAULT"}},"pageTitleOverlay":{"default":{"color":"rgba(41, 51, 60, 0.2)"}},"pageTitleBackground":{"default":{"color":"#EDEFF2"}},"75bd3b80e13a00e62b92d10e1ac1f594":"","ec8a4ffff18249b24fe94331c116cb9a":"","980534ebdd2a21cd3757d037fb05cf7c":"","9000e610886499aec07787757f0e3d96":"","e3da0854aff31daa2412e178de4c35e4":"","7bc74236b2f2fe9e2e94ae007e48af94":"","169625211c93b693d6bc9bd9a8210a09":"","1544ec9c0566830d9fec3616e19feab3":"","4acb422a09b8249df6697cf4a56bef85":""},"_links":{"self":[{"href":"https:\/\/pixelstudio.id\/blog\/wp-json\/wp\/v2\/posts\/958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pixelstudio.id\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pixelstudio.id\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pixelstudio.id\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pixelstudio.id\/blog\/wp-json\/wp\/v2\/comments?post=958"}],"version-history":[{"count":10,"href":"https:\/\/pixelstudio.id\/blog\/wp-json\/wp\/v2\/posts\/958\/revisions"}],"predecessor-version":[{"id":1585,"href":"https:\/\/pixelstudio.id\/blog\/wp-json\/wp\/v2\/posts\/958\/revisions\/1585"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pixelstudio.id\/blog\/wp-json\/wp\/v2\/media\/995"}],"wp:attachment":[{"href":"https:\/\/pixelstudio.id\/blog\/wp-json\/wp\/v2\/media?parent=958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pixelstudio.id\/blog\/wp-json\/wp\/v2\/categories?post=958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pixelstudio.id\/blog\/wp-json\/wp\/v2\/tags?post=958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}