

- SYNCHIN LOCAL MAMP WORDPRESS TO LIVE HOW TO
- SYNCHIN LOCAL MAMP WORDPRESS TO LIVE INSTALL
- SYNCHIN LOCAL MAMP WORDPRESS TO LIVE UPDATE
- SYNCHIN LOCAL MAMP WORDPRESS TO LIVE FULL
- SYNCHIN LOCAL MAMP WORDPRESS TO LIVE CODE
SYNCHIN LOCAL MAMP WORDPRESS TO LIVE CODE
This launches webpack dev server at Source code edits will be automatically reflected in the browser. dev-env/wp/wp-config.php):ĭefine('VERSIONPRESS_REQUIRE_API_AUTH', false) In your test WordPress site, put this to wp-config.php (the file should be editable at. You should be able to visit in the browser and the frontend/src/config/ should contain this URL as API root. Make sure that the site is running and that VersionPress is activated in it.Let's assume you run the frontend against the default Docker site. Running frontend separately ¶įor pure frontend development, it's more convenient to run it outside of the WordPress administration. Run npm run lint in the frontend directory. Linting task is set up for the frontend project. Answer "No" to Compile TypeScript to JavaScript? prompt.Run npm run init-phpstorm if you haven't done that already.VersionPress uses a JavaScript frontend implemented as a React app in the. Debugging should now work:Īfter you're done with debugging, run npm stop or npm run stop-and-cleanup. Place a breakpoint somewhere, e.g., in the main versionpress.php file, and start listening for debug connections in PhpStorm. The default zero configuration settings in Settings > Languages & Frameworks > PHP > Debug should be fine:Įnable debugging in the browser, most commonly using a browser extension or a bookmarklet: /plugins/versionpress -> /var/www/html/wp-content/plugins/versionpress.
SYNCHIN LOCAL MAMP WORDPRESS TO LIVE UPDATE
Specifically, update the WordPress mapping which PhpStorm does not persist automatically: In PhpStorm, go to Settings > Languages & Frameworks > PHP > Servers and check the path mappings of the pre-configured VersionPress-dev server.
SYNCHIN LOCAL MAMP WORDPRESS TO LIVE HOW TO
Here is how to make debugging work in PhpStorm the Debugging tests section gives an example of how to make debugging work in VSCode. The development containers have Xdebug installed and configured.

Please refer to the Contributing code section in CONTRIBUTING.md.
SYNCHIN LOCAL MAMP WORDPRESS TO LIVE INSTALL
It is also useful to install the EditorConfig extension, VersionPress ships with some basic formatting rules. For example, global functions are defined as vp_register_hooks(), not registerHooks(). Note: Most VersionPress code uses the PSR-2 coding standard with only the parts directly interacting with WordPress using WordPress conventions.
SYNCHIN LOCAL MAMP WORDPRESS TO LIVE FULL
On the first start, you'll see two prompts:Įnable WordPress support but leave the installation path empty (ignore the warning):įor Code Sniffer inspections to work, there's a one-time configuration: Go to Settings > Languages & Frameworks > PHP > Code Sniffer, select Local, click the three dots next to it and provide your full system path to. Open the plugins/versionpress project in PhpStorm. The steps here have been tested in PhpStorm 2018.1. PhpStorm setup ¶įor PHP development, we recommend PhpStorm and ship project files for it. This section is about the former, the latter is described in Frontend development below. VersionPress consists of PHP code implementing the core versioning logic and a React frontend. Run npm run stop-and-cleanup to also clean up WordPress files and MySQL database for a fresh start next time. Run npm stop to stop the development environment. Values in docker-compose.yml can be customized via.Aliasing docker-compose to dc will save you some typing.

