How to increase Vagrant memory

WordPress is very heavy on your Vagrant.
It caused by few memory.

Let’s increase memory on your Vagrant.

step01
Open your Vagrantfile.

step02
Find the following line about changing memory below.

  # config.vm.provider "virtualbox" do |vb|
  #   # Display the VirtualBox GUI when booting the machine
  #   vb.gui = true
  #
  #   # Customize the amount of memory on the VM:
  #   vb.memory = "1024"
  # end

step03
Change the line as below.
vb.memory means Vagrant memory.
If you Change this number , you can increase your Vagrant memory.

   config.vm.provider "virtualbox" do |vb|
  #   # Display the VirtualBox GUI when booting the machine
  #   vb.gui = true
  #
  #   # Customize the amount of memory on the VM:
     vb.memory = "2048"
   end

step04
Save your Vagrantfile & restart Vagrant on your Terminal.

vagrant halt
vagrant up

Your local wordpress will be fast.

vagrant

Store close without deactivate cart button. EDD Store Hours Plugin.

Easy Digital Downloads EDD store Hours Plugin is control your store open and close.
https://wordpress.org/plugins/easy-digital-downloads-store-hours/

But this plugin deactivate cart button when close setting is active.

This is inconvenience when you want to test cart button , So I try to custom this plugin.

To be Cart button active even when store is closed

Paste the following code in functions.php of your wordpress theme.

This code can be active cart button even when store is closed.

remove_filter( 'edd_purchase_download_form', 'edd_store_hours_override_purchase_button', 200, 2 );
remove_action( 'edd_pre_add_to_cart', 'edd_store_hours_override_add_to_cart', 200, 2 );

Judgement store conditional using edd_store_hours_is_closed function

<?php if(edd_store_hours_is_closed()): ?>
<!-- This content is displayed when store is closed -->
<?php else: ?>
<!-- This content is displayed when store is open -->
<?php endif; ?>

If you use this method , you can store close without deactivate cart button.