Worpress Theme Development
The easiest way I have found to work on a custom Wordpress theme is to use Local.
If the site is already live, get a SQL dump
wp-config.phpfile and add the following lines:
In the same file, you might also need to update the table prefix, look for
Get a copy of the
wp-contentdirectory of your site
Download and install Local
Create a zip archive that contains the SQL dump, the copy of the
wp-contentdirectory and the
Drag and drop the archive in Local and follow the setup assistant
Create a symbolic link to your theme:
ln -s /absolute/path/to/theme /absolute/path/to/Local/site/location
When you need a fresh version of the DB or the content, you just have to put together the zip archive again. Just delete the existing site and create a new one.
An alternative way to do local theme development is to use Docker: github.com/nezhar/wordpress-docker-compose.