To create WordPress site locally quickly with Valet and install a few plugins to get started with.
This is a slight modified version from AaronRutley's version.
- Install Valet
- Install WP-CLI
- Download / Clone this repo into a directory like
~/.valetpress - Edit the valetpress file as you need.
- Include the valetpress script in your
.bashrcor.zshrcor similar file.
if [ -f ~/.valetpress/valetpress ]; then
source ~/.valetpress/valetpress
else
print "404: ~/.valetpress/valetpress not found."
fi
vp create
- Will ask for the name of your project, enter something like
myproject. - Download WordPress into a directory like
~/Sites/myproject - Setup the mysql database called
myproject - Create
wp-config.phpfile & set'WP_DEBUG' = TRUE,'WP_MEMORY_LIMIT' = 512M. - Delete plugins
hello,akismet. - Delete themes
twentynineteen,twentytwenty. - Install plugins.
- Import demo content from https://raw.githubusercontent.com/WPTT/theme-unit-test/master/themeunittestdata.wordpress.xml
- Access admin via
http://myproject.test/wp-admin/with username asmyprojectand password aspassword.
vp empty
Same as create but without demo content.