The IDRC produces, runs, and maintains a number of Wordpress sites.
This section of the wiki documents the various projects and resources for Wordpress development.
Before starting, make sure Valet has not been installed previously on Windows. Uninstall that version before attempting to install Valet for Linux. See "Uninstalling Valet for Windows" below.
sudo apt install php
sudo apt install php-[module-name]
wp valet new <project name> --dbuser=<system username>
Using Windows for development, and Wordpress on Ubuntu
Ubuntu on WSL lacks a rich IDE aside from terminal based text editors (vi, emacs, etc.). To use Windows for development, and use Ubuntu for Wordpress hosting try the following:
In Ubuntu, make a symbolic link to your project on Windows. Example:
ln -s /mnt/c/development/my-project-plugin/ ~/wordpress/wp-content/plugins/my-project-plugin
Restarting Wordpress after Shutting down Ubuntu
After shutting down Ubuntu, you may need to restart Wordpress the next time logging in. Note: some of this may not be required if it is scripted / automated.
In the same directory, create a batch file called `wp.bat`. The batch file should contain:
php "C:\Program Files (x86)\wp-cli\wp-cli.phar" %*
The path to this new directory needs to be added to Windows 10 environment variable so the wp cli can be used. To do this:
Go to Windows menu > Settings > type "environment" into the search bar > choose "Edit System Environment Variables"
In the dialog that appears, choose "Environment Variables" button (bottom right)
Under the "System variables" pane, choose "Path" from the list and select Edit button.
Select "Browse" button and find the directory for wp-cli created earlier and OK to confirm.
Logout of Windows 10 or restart
Open a command prompt and type `wp`. You should see the following output:
Manage WordPress through the command-line.
cache Adds, removes, fetches, and flushes the WP Object Cache object.
If Valet for Windows is installed, it may interfere with installation of Valet for Linux. To uninstall Valet for Windows:
composer global remove cretueusebiu/valet-windows