This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"get ID of the php fpm | |
ps -faux | grep -I $(pwd | awk -F/ '{print $4}' | cut -c -7 ) | grep php-fpm | |
get the ID of the php fpm child | |
make sure to login as root: btool su | |
strace command: | |
strace -s 1024 -P CHILD_ID -e trace=file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Let’s try these steps from your local environment. | |
1.) Backup the wp-content folder (save it somewhere). Then delete folder that folder. | |
2.) Reset the site code base (undo commit) to the last applied core updates / successfully update (you can find the commit hash / find something update to Wordpress in the site dashboard -> dev site. -> code). If doesn’t work, find the next successful core updates. See. This guide on how undo commits: https://pantheon.io/docs/undo-commits/ <— | |
Example: | |
git reset --hard d2043a0e | |
d2043a0e is the commit where I was able to update WordPress core in the past. | |
3.) git pull -Xtheirs git://github.com/pantheon-systems/WordPress.git master | |
4.) Restore the wp-content folder | |
5.) git push origin master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load causing_forms_query() function after WP loads. | |
add_action( 'init', 'causing_forms_query' ); | |
function causing_forms_query() { | |
add_shortcode('cforms', 'cforms_scode'); | |
} | |
function cforms_scode( $attr, $content="") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'init', 'start_logging' ); | |
function start_logging() { | |
// GET IP | |
if ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) { | |
//check ip from share internet | |
$ip = $_SERVER['HTTP_CLIENT_IP']; | |
} elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( wp_doing_ajax() ) | |
{ | |
echo "admin-ajax.php is here...<br>"; | |
// Check which action is using that ajax.. | |
$ajax_action = $_REQUEST['action']; | |
echo "It is calling this action: <br>" . $ajax_action . "<br>"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"ajax_action": "loadmore", | |
"timestamp": 1590312858 | |
}, | |
{ | |
"ajax_action": "loadmore", | |
"timestamp": 1590312867 | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// This is your ajax handler called to generate contents file | |
function wcg_start_generate_function() { | |
// Retrieve data from ajax | |
if( isset( $_POST[ "post_type" ] ) ) { | |
$post_type = $_POST[ "post_type" ]; | |
$quantity = $_POST[ "post_qty" ]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function ($) { | |
// Create contents -- START | |
$( ".wcg_submit" ).click(function() { | |
post_type = jQuery('select.wgc_post_type').val(); | |
qty = jQuery('.wcg_count').val(); | |
data = { | |
"action": "wcg_start_generate", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant@causingdesigns:~/trellis$ ansible-playbook deploy.yml -e env=staging -e site=staging-rosellejoycausing.kinsta.cloud --limit=kinsta_staging | |
/usr/local/lib/python2.7/dist-packages/cryptography/__init__.py:39: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release. | |
CryptographyDeprecationWarning, | |
PLAY [Ensure necessary variables are defined] ******************************************************************************************************************************* | |
[WARNING]: Failure using method (v2_playbook_on_play_start) in callback plugin | |
(<ansible.plugins.callback./home/vagrant/trellis/lib/trellis/plugins/callback/vars.CallbackModule object at 0x7f891b69c990>): 'AnsibleUnicode' object has no attribute | |
'get_groups' | |
skipping: no hosts matched |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Serial port 1 (console) output for instance-1-eng-2819 | |
[2J[01;01H[=3h[2J[01;01H[2J[01;01H[=3h[2J[01;01HCSM BBS Table full. | |
BdsDxe: loading Boot0003 "ubuntu" from HD(15,GPT,75740168-3E29-49A1-B76C-768ECDE1FF97,0x2800,0x35000)/\EFI\ubuntu\shimx64.efi | |
BdsDxe: starting Boot0003 "ubuntu" from HD(15,GPT,75740168-3E29-49A1-B76C-768ECDE1FF97,0x2800,0x35000)/\EFI\ubuntu\shimx64.efi | |
UEFI: Attempting to start image. | |
Description: ubuntu | |
FilePath: HD(15,GPT,75740168-3E29-49A1-B76C-768ECDE1FF97,0x2800,0x35000)/\EFI\ubuntu\shimx64.efi | |
OptionNumber: 3. |
OlderNewer