Wordpress

Install and maintain

Composer

"extra": {
	"webroot-dir": "www",
	"webroot-package": "wordpress",
	"installer-paths": {
		"app/plugins/{$name}/": ["type:wordpress-plugin"],
		"app/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
		"app/themes/{$name}/": ["type:wordpress-theme"]
	}
}

Docker

Config

Update site URL

Plugins

Rest API

Themes

Simple/cleared theme: BlankSlate — Free WordPress Themes

Block theme

Aka theme.json

Template hierarchy

Theme development

Aka navigation menu

Performance and optimisation

Use OPcache

Tools:

Plugins:

SAVEQUERIES should be false

Custom fields

Fields starts with _ are not visible defaut meta box for custom field

Gutenberg editor plugins can be written with JSX/ES6 or ES5 (without compilation)

Validation / sanitization / authorization:

Some:

See also:

Custom post types

Custom plugins

mu-plugins aka multi user plugins, must-use plugins

Taxonomy

Aka categories, tags

Rewrite

Regenerate thumbnails

Responsive images

Update URL and media filename

Backup and migration

AJAX

  • http://code.tutsplus.com/articles/getting-started-with-ajax-wordpress-pagination--wp-23099

  • http://codex.wordpress.org/AJAX_in_Plugins

  • http://www.smashingmagazine.com/2011/10/18/how-to-use-ajax-in-wordpress/

  • https://wordpress.org/plugins/rest-api/

Captcha

  • http://wordpress.org/plugins/really-simple-captcha/

Form

User feedback

  • http://wordpress.org/plugins/get-satisfaction-for-wordpress/

  • http://wordpress.org/plugins/user-voice/

  • http://www.onfry.com/projects/voteitup/

  • https://getsatisfaction.com/getsatisfaction/topics/pulling_back_support_for_wordpress_integration

  • https://developer.uservoice.com/docs/api/getting-started/

  • http://feedback.uservoice.com/forums/1-general-feedback

  • http://wordpress.org/plugins/uservoice-idea-list-widget/

  • http://feedback.uservoice.com/knowledgebase/articles/56243-use-a-link-custom-trigger-to-open-the-uservoice

  • http://feedback.uservoice.com/knowledgebase/articles/276635-use-just-smartvote-the-contact-form-or-satisfacti

  • GetSatisfaction

  • Zendesk

  • Desk

Job manager

  • http://wordpress.org/plugins/job-manager/

  • http://wordpress.org/plugins/wp-job-manager/

  • http://premium.wpmudev.org/blog/6-wordpress-job-board-solutions/

Social integration Twitter / Facebook

  • http://wordpress.org/plugins/facebook/

  • https://wordpress.org/plugins/twitter/

  • http://wordpress.org/plugins/recent-facebook-posts/

  • http://wordpress.org/plugins/custom-facebook-feed/

  • http://wordpress.org/plugins/fb-wallpost-widget/screenshots/

  • FB as RSS

Multilingual

Note: Has a performance impact

Localization

Aka translation

Use full locale name in .mo filenames For mu-plugins (see load_muplugin_textdomain()):

For plugins (see load_plugin_textdomain()):

For theme (see load_theme_textdomain()):

See also _get_plugin_data_markup_translate(), for a plugin with meta comment Domain Path: /languages (default to empty) and Text Domain: text-domain (require, or no text domain will be (auto-)loaded) will load wp-content/plugin/<pluginslug><domainpath>/<textdomain>-<locale>.mo.

To debug which .mo files are loaded:

Plurals

SVG

Security

See Wordpress

File permissions for automatic update

Apache use a different group than FTP users. It's a safe measure, but updates can't be automatic (require SSH or FTP credentials). Ex: FTP: user 522/538; Apache/PHP: 48/48 (www-data)

The Code is in get_filesystem_method(). Wordpress tries to create a file 'wp-content/temp-write-test-'.time()

Minify

Test

From westonruter/amp-wp-theme-compat-analysis/start.sh:

OOP

In wp-content/themes/<themeslug>/functions.php:

Code

External script use WordPress functions

Aka headless, api

Last updated

Was this helpful?