Skip to content

Instantly share code, notes, and snippets.

@jennimckinnon
jennimckinnon / post-meta.sql
Created June 18, 2015 06:48
Delete post meta data in WordPress database via <http://benmarshall.me/wordpress-sql-queries/#num-spam-entries>. Referencing for post.
DELETE FROM wp_postmeta WHERE meta_key = 'your-meta-key';
wp media regenerate 12 34 567
wp media regenerate
wp media regenerate --yes
@jennimckinnon
jennimckinnon / php5.ini
Last active June 8, 2020 17:23
Increasing the file upload limit for WordPress.
upload_max_filesize = 1000M
post_max_size = 2000M
memory_limit = 3000M
file_uploads = On
max_execution_time = 180
@jennimckinnon
jennimckinnon / header.php
Created June 3, 2020 10:14
For an article.
<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico" />
@jennimckinnon
jennimckinnon / header.php
Created June 3, 2020 10:12
For an article.
<link rel="shortcut icon" ... /favicon.ico" />
@jennimckinnon
jennimckinnon / index.html
Created June 3, 2020 10:10
For an article.
<head profile="http://www.w3.org/2005/10/profile">
<link rel="icon"
type="image/png"
href="http://example.com/myicon.png">
@jennimckinnon
jennimckinnon / .htaccess
Created April 18, 2020 11:36
For an article
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
@jennimckinnon
jennimckinnon / .htaccess
Created April 18, 2020 11:35
For an article
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d