Skip to content

Instantly share code, notes, and snippets.

View bdeleasa's full-sized avatar

Brianna Deleasa bdeleasa

View GitHub Profile
@bdeleasa
bdeleasa / convert-to-composer.php
Created May 23, 2024 20:36 — forked from pelmered/convert-to-composer.php
Convert WP to Composer
#!/usr/bin/php
<?php
/**
* USAGE:
*
* (optional) Download script:
* "wget https://gist.githubusercontent.com/pelmered/2ee27f1cb18b8c73a0205ded580e3195/raw/convert-to-composer.php"
*
* Basic usage:
* php convert-to-composer.php
@bdeleasa
bdeleasa / wordpress-db-get-autoload-size.sql
Created June 28, 2022 20:49 — forked from yanknudtskov/wordpress-db-get-autoload-size.sql
This will show you the autoloaded data size, how many entries are in the table, and the first 10 entries by size. #optimization #database #mysql
SELECT 'autoloaded data in KiB' as name, ROUND(SUM(LENGTH(option_value))/ 1024) as value FROM wp_options WHERE autoload='yes'
UNION
SELECT 'autoloaded data count', count(*) FROM wp_options WHERE autoload='yes'
UNION
(SELECT option_name, length(option_value) FROM wp_options WHERE autoload='yes' ORDER BY length(option_value) DESC LIMIT 10)