Skip to content

Instantly share code, notes, and snippets.

View ToughCrab24's full-sized avatar
🏠
Working from home

Shane Daly ToughCrab24

🏠
Working from home
View GitHub Profile
@jordanmaslyn
jordanmaslyn / functions.php
Created January 6, 2022 23:33
Fix Yoast sitemaps when working with headless WP
<?php
/*
* Replacing domain for rest api requests from Gutenberg editor if youre using
* WP headless and WP_SITEURL & WP_HOME are not the same domain
* (has nothing to do with yoast)
*/
add_filter('rest_url', function($url) {
$url = str_replace(home_url(), site_url(), $url);
return $url;
@chadrien
chadrien / README.md
Last active July 18, 2024 08:31
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
&amp;&amp; echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" &gt; /usr/local/etc/php/conf.d/xdebug.ini \