An index speeds up the serving of data by allowing you to quickly find data in a table without having to go row by row […]
Split A Large MySQL Table Into Multiple SQL Files
If you have a large database table that is causing your import to fail, you can split the table out into smaller more manageable chunks […]
Copy MYSQL Table Structure and Import Specific Columns
This code will allow you to copy the table structure from an existing table into a new one and then copy data from specific columns […]
Add Custom Image & Thumbnail Upload MetaBox To WordPress
This creates a custom metabox for posts and pages and allows us to upload an image. Copy it into your child theme’s functions.php file NOTE: […]
Add A Primary Key To A Table In MYSQL
Run the following code to amend an existing column into a Primary Key ALTER TABLE `wp_posts` ADD PRIMARY KEY (`ID`), MODIFY `ID` bigint(20) UNSIGNED NOT […]
Change Image Filenames In MYSQL (jpg to png)
Create a script (replacing the variables as necessary) and run it to replace ALL instances of (in this case) “star.jpg” to “star.png” <?php // CHANGE […]
Set First Image In WordPress Post As The Featured Image
Add the following code to your functions.php file. To run it, simply visit any page on the site – DO NOT USE THIS CODE ON […]
Reset All TCP/IP Ports
I recently started running into a problem when using XAMPP webserver to develop site locally. Occasionality the MYSQL service wouldn’t start due to a blocked […]
Add Custom Content & Read More Link To WordPress RSS Feed
In your functions.php file add in the following code // Customize the content of the custom RSS feed function custom_rss_item($content) { global $post; // Build […]
Add Your Own Code Formatting In The Classic Editor With TinyMCE
If you want to add custom formatting to your content but don’t want to have to go into the HTML view and manually type it […]