The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
The actual step-by-step WordPress / MySQL fix… | |
1. Back up all your stuff first (likely using phpMyAdmin / CPANEL) | |
Before doing any of the following it strongly encouraged to back up all your data and files. Just to be safe. At the very least, your full database and the WordPress config file: wp-config.php | |
2. Note the settings that your WordPress is currently using (from wp-config.php) | |
Specifically, your MySQL database configuration, including DB_NAME, DB_USER, DB_PASSWORD, and also DB_CHARSET and DB_COLLATE | |
// ** MySQL settings - You can get this info from your web host ** // |
<?php | |
/** | |
* This file will demonstrate a method to export fields to code. | |
* You can use this to easily create fields using the UI, export to code | |
* and then use in a custom module. Upon installation of the module | |
* your fields and instances will already be set up. | |
*/ | |
// Create the fields you want using the Drupal UI. | |
// On the same site, go to example.com/devel/php |
<?php // If you'd rather have category drop downs ?> | |
<form action="#" method="get" id="event-change"> | |
<?php | |
$current = get_query_var('tribe_events_cat'); | |
$terms = get_terms($tribe_ecp->get_event_taxonomy()); | |
$count = count($terms); | |
if ( $count > 0 ){ | |
echo '<select class="events-cat-menu"><option value="-1">All Events</option>'; | |
// print_r($terms); | |
$selected = ''; |