Deactivate WordPress plugins and themes from phpMyAdmin

Sometimes plugin or theme conflicts can disable a WordPress site. Often, renaming the plugin folder can get your site back up, but if you don’t have access to the file system, it’s kinda tough to rename that folder! If you have access to the database though, you can try using phpMyAdmin to disable the plugins and/or theme.

Here’s a walk-through for that.

The Details

You’ll need to ensure you’re logged in to phpMyAdmin. If you’re not sure how to access that, you can ask your web host. They’ll usually provide a help page for it.

Once logged in to phpMyAdmin, you can switch the current theme as follows.

Select your main WordPress table.

phpMyAdmin - Select WP table

Select the wp_options table (the name might be different depending on how you or your web host has configured it but wp_options is the most common and default name).

phpMyAdmin - Select wp_options table

Click the Search tab.

phpMyAdmin - Search tab

Replace ‘template’ option

In the options name field, type ‘template‘ and press Enter (or press the Go button).

phpMyAdmin - Search for 'template'

You’ll then see a list of results, there should be just one item there with the option_name ‘template’. Locate the ‘option_value‘ column and double-click that value.

phpMyAdmin - Search results - Edit option_value

Replace that value with ‘twentyfifteen‘ and press Enter.phpMyAdmin - Search and replace template value

That will set the theme to Twenty Fifteen, which is the best current starting point for trouble shooting.

REPLACE ‘stylesheet’ OPTION

Now, do that once more for the stylesheet. Click the Search tab and in the option_name field, type ‘stylesheet‘ and press Enter.

In the search results, change the option_value to ‘twentyfifteen‘.

REPLACE ‘active_plugins’ OPTION

We’ll do that just one more time, for the active plugins. Click the Search tab again and in the option_name field, type ‘active_plugins‘ and press Enter.

The option_value for that one should look rather cryptic. Simply select and delete it all and press Enter.

phpMyAdmin - Search and replace 'active_plugins'

That will deactivate all the plugins on your site.

 

 

That’s it!

With that done, assuming the trouble on your site was due to a plugin or theme conflict of some sort, you should be able to access your site once more.

To help with the troubleshooting, here’s a very helpful flowchart: http://premium.wpmudev.org/wp-content/uploads/2013/12/Support-Process-Support-Process.png

Which reminds me, if it’s still presenting trouble, or if you’d just rather not bother with it yourself, I’d recommend checking with these guys: https://premium.wpmudev.org/

WPMU DEV provides extensive, professional support services for the WordPress platform, backed by many years of experience (they’re the same people behind Edublogs.org).

Cheers! 🙂

Deactivate WordPress plugins and themes from phpMyAdmin

Get a self-hosted WordPress site for free at OpenShift

WordPress.com is great but sometimes you need to be able to install third-party plugins and themes. That’s where services like OpenShift come in really handy.

Here’s how to use OpenShift’s free tier to setup WordPress for free.

 

So, through OpenShift’s free offering, you get 3 “gears” that you can use to add up to 3 applications, WordPress being an application. Thus you can add up to 3 separate WordPress sites with that free tier.

I mentioned in the video that you can use a custom domain name too. I’ll try and cover that in more detail in a future video.

Any other questions for now though, feel free to ask. 🙂

Get a self-hosted WordPress site for free at OpenShift

Download YouTube videos and entire playlists

I post a lot of stuff to YouTube, much of which is designed for use with other software. I’ve got tons of Future Pinball gameplay videos, for example. They’re designed for use with app loaders like HyperSpin.

So how does someone get them all?

Easily, there are downloaders for YouTube videos. My favorite so far is this really new one: http://panastasiadist.github.io/SYLoader/

SYLoader

I like that one is because it’s open-source, developers can see what it’s doing! And, that thing downloads single videos as well as entire playlists in batches.

Just copy a YouTube url and it picks it up moments later and begins the download. Easy.

In case it helps to mention alternatives also, here’s a link: https://alternativeto.net/software/syloader/?license=opensource

Don’t be a Video Pirate!

I’m not one to advocate using downloaders for bad reasons like copying other people’s videos that they put hard work into. Don’t do that. But downloaders like this are incredibly useful for stuff like the Future Pinball videos I mentioned.

Hope it helps. 🙂

Download YouTube videos and entire playlists

Displaying fields with a shortcode for CFS

I wrote a bit previously about the Custom Field Suite plugin here: https://ugotsta.wordpress.com/2015/07/18/displaying-all-fields-with-custom-field-suite/

To reiterate, Custom Field Suite is a powerful, free plugin for easily creating custom fields in WordPress using an elegant graphic interface.

One problem

As amazing as this plugin (and it’s elegant interface) is, non-developers will likely struggle to display their custom fields. It requires custom PHP code.

While the plugin makes it dead simple for developers to code their custom solution, it’s not quite so easy for non-developers. So I’ve been working to simplify that.

Here’s the result so far:

With that downloaded and installed as a plugin, you’ll have a simple shortcode at your disposal:

[cfs-fields]

That little shortcode will render all the fields for the currently viewed post in a list. It works with no parameters by default, but there are a bunch of options if needed:

  • exclude: a comma-delimited list of field names to exclude
  • exclude_titles: a comma-delimited list of field names for which to “not” render titles.
  • container_class: a CSS class for the container, if needed, to easily target items.
  • field_class: a CSS class for each field.
  • list_type: an option to render the fields as lists or divs; ordered, unordered or div.
  • render_post_title: true to render the title, false otherwise.
  • render_empty: true to render empty fields (fields with no value specified), false to not display them.

As an example, if you had a bunch of fields to display but wanted to hide the fields with the names, ‘id’ and ‘release_year’, you could use the shortcode like so:

[cfs-fields exclude=”id, release_year”]

Again, those options are not necessary. The shortcode will just fine on its own.

There’s a lot more I should say about it, but I hope this much info helps for those looking to easily display their fields with CFS. As I get this one more refined, I’ll get some more extensive info and a video to walk through it.

Any questions, just let me know. 🙂

Displaying fields with a shortcode for CFS

Highlight your code here on WordPress.com

I’ve seen people posting code here on WordPress.com, yet without the code being highlighted. It’s incredibly helpful to have the code higlighted though, it distinguishes it from other content.

Fortunately, WordPress.com has made it very easy to highlight code, just surround the code with Wordpress.com - code shortcode shortcodes. Here’s a quick walkthrough:

A quick example

As an example, if you have some Visual Basic code to post, you could add it like so:

Wordpress.com - code highlighting

And WordPress will render it like this:

Function getColor(ByVal number As Integer) As String
   Dim result As String
   If (number = 1) Then
       result = "red";
   Else
       result = "green";
   End If
   return result
End Function

The shortcode supports all the popular programming languages too. Here are the official details about it: https://en.support.wordpress.com/code/posting-source-code/

I hope more people will use it, makes it much easier for readers to see what’s going on, plus it looks real pertty! 🙂

Highlight your code here on WordPress.com