Design/build: WordPress themes

from design prototype to theme : how to get started

troubleshooting

There will be times when things go wrong, as with any web setup. The dreaded white screen of death might rear its ugly head, or the connection to database seems broken. The causes of such errors vary: a WP update might have thrown up errors with plugins that previously worked but have not been updated; the theme is no longer compatible with the version of WordPress or PHP, for example.

The best cause of action will be to check on theme and plugins yourself. You might be able to find the culprit and therefore solve the isue yourself. If not, it might be time to open a ticket with technical support and ask the server experts to have a look.

Plugins

To find which part of your setup is the trouble-maker (more likely a plugin than the theme) — start by disabling the plugins and checking whether the site is back.

To disable plugins:

  1. connect to your server via FTP and navigate to the wp-content folder
    Remember: this is the only folder you should make changes to.
  2. rename the plugins folder to something different, e.g. plugins-deactivate
    This will cause WordPress to ignore this folder, and therefore render all plugins inactive.

If the theme works at this point, without any plugin content or enhancements, then it’s likely that a plugin caused the problem. Check whether any updates are needed and ensure both WordPress and plugins are up-to-date.

To activate plugins:

  1. rename the folder again, back to plugin
    This will cause WordPress to recognise and load this folder again.
  2. All plugins are available again in admin ~ you can now proceed to activate them again, one by one.

Proceed with enabling your plugins one by one and check when things go wrong. Worst case scenario is when your site uses a plugin which is no longer being updated. You can then either try to update the code yourself, or find an alternative.

Themes

If you are using a given theme, a similar scenario could happen. If a theme clashes with an update to core, then the process would be the same: deactivating the current theme and forcing the default template to be used instead.

To deactivate theme:

  1. connect to your server via FTP and navigate to the wp-content > themes folder
    You’ll need to know the name of the theme.
  2. rename the yourtheme folder to something different, e.g. yourtheme-deactivate
    This will cause WordPress to ignore this folder, and therefore revert to using a default theme instead.

By changing to the default theme, any theme or theme function related issues are no longer present. The site should behave as normal. You can now check the theme files for compatibility or errors and update your code accordingly.

To reactivate theme:

  1. upload the new theme version, or rename the folder again after update, back to yourtheme
    This will cause WordPress to recognise and load this folder again.
  2. activate and test your theme

useful reading

July 30th, 2021 by prisca