This document provides 13 tips for WordPress developers to optimize their database performance. It recommends making regular database dumps, using wp-cli commands to manage the database, cleaning up bloated tables like wp_options and wp_postmeta, configuring the database server properly, using object caching like Redis to improve performance, and monitoring performance with tools like slow logs and profiling. The tips aim to help developers identify and address common database issues that can impact a WordPress site's security and speed.
A very simple tutorial to get started in Drupal content management system. Even non-programmers, technology entrepreneurs, business/marketing professionals, web designers and graphic artists can follow it.
The objective of this workshop was to discuss the key features of WordPress. The key feature includes themes, plugins, hooks, shortcodes, cache, translations, wp-configs, wpdb, template hierarchy, wp rest API. WordPress has it's own standards in many cases. It is always good to practice those standards to get the provided benefits.
Site:
https://upokary.com/
A very simple tutorial to get started in Drupal content management system. Even non-programmers, technology entrepreneurs, business/marketing professionals, web designers and graphic artists can follow it.
The objective of this workshop was to discuss the key features of WordPress. The key feature includes themes, plugins, hooks, shortcodes, cache, translations, wp-configs, wpdb, template hierarchy, wp rest API. WordPress has it's own standards in many cases. It is always good to practice those standards to get the provided benefits.
Site:
https://upokary.com/
With OpenCms 9.5, the SOLR collector has been introduced as the best method to get a specified list of resources out of the VFS. This collector allows the developer to formulate a SOLR query as collector parameter to get flexible result lists. However, since it is based on the collector interface, the SOLR collector cannot deal with the wealth of additional information that is provided with the search result.
Enter OpenCms 10 <search /> tag. This new tag has been specifically designed to be a drop-in replacement the <collector /> tag, tailored especially for SOLR queries and result sets. Using this new tag you can easily generate advanced searches including facets and “did you mean” results.
In this session, an overview is provided about the SOLR integration in OpenCms in general. The SOLR collector with the new <search /> tag available in 10 will be compared and best practices of using SOLR in OpenCms 9.5 and 10 will be provided.
Becoming a drupal master builder - Given at Drupal Camp London 2016
I've been building Drupal sites for a number of years and have a broad experience building Drupal sites with various levels of complexity. I often work with other agencies to build Drupal sites or to migrate existing sites and as a result I will often see some very common mistakes and errors that shouldn't be happening. Due to Drupal's popularity I also see Drupal sites in the wild and can clearly see the same mistakes going on there as well.
During this talk I'll show some basic site building tips as well as some more complex and technical strategies that will make your Drupal sites better and more maintainable. Rather than just show you what to do, I'll also be explaining why doing those things are important and how developers and their websites will benefit from them. Although I'll be mainly concentrating on Drupal 7, some of these techniques are also applicable to Drupal 8.
WP-CLI is an awesome WordPress plugin that can be used to automate a bunch of difficult WordPress tasks. This presentation walks you through basic WP-CLI commands and creating custom commands.
Drupal 8 Configuration Management with FeaturesNuvole
Configuration Management is one of the prominent new features coming with Drupal 8. The reference use case for Configuration Management in Drupal 8 is quite different than the standard Drupal 7 + Features use case, both for a site builder and for a developer. And the Features module in Drupal 8 will have to be used in a different way.
Drupal is an open source content management system (CMS) written in PHP. It is a publishing platform and used to create blog and enterprise applications. Drupal gives a strong base for organizing, structuring, creating, developing and managing web presence. Drupal has standard structure which makes it easier to access basic functionalities and source code to anyone who wants to work on it. It comes with multiple user features which allow creating multiple users and each can be assigned different roles and permission. Drupal has thousands of add-on modules and designs which enable to you to create a unique website that you desire. Its PHP based platform allows the safe and secure management of websites.
10 things every developer should know about their database to run word press ...Otto Kekäläinen
Talk from WordCamp Barcelona 2018
https://2018.barcelona.wordcamp.org/session/10-things-every-developer-should-know-about-their-database-to-run-wordpress-optimally/
The database is perhaps the most important piece of your infrastructure. The database contains all your important e-commerce data and must be kept secured. The database performance often defines the overall performance of your WordPress site. In this talk I the most important things every WordPress developer should know about MariaDB/MySQL to be able to build and operate their site optimally.
This talk is about optimizing your ruby and rails code. It focuses on the basics. Too many times people focus on using fun tools. Before you attack the fun stuff you should tackle the low hanging fruit. ror-e.com
With OpenCms 9.5, the SOLR collector has been introduced as the best method to get a specified list of resources out of the VFS. This collector allows the developer to formulate a SOLR query as collector parameter to get flexible result lists. However, since it is based on the collector interface, the SOLR collector cannot deal with the wealth of additional information that is provided with the search result.
Enter OpenCms 10 <search /> tag. This new tag has been specifically designed to be a drop-in replacement the <collector /> tag, tailored especially for SOLR queries and result sets. Using this new tag you can easily generate advanced searches including facets and “did you mean” results.
In this session, an overview is provided about the SOLR integration in OpenCms in general. The SOLR collector with the new <search /> tag available in 10 will be compared and best practices of using SOLR in OpenCms 9.5 and 10 will be provided.
Becoming a drupal master builder - Given at Drupal Camp London 2016
I've been building Drupal sites for a number of years and have a broad experience building Drupal sites with various levels of complexity. I often work with other agencies to build Drupal sites or to migrate existing sites and as a result I will often see some very common mistakes and errors that shouldn't be happening. Due to Drupal's popularity I also see Drupal sites in the wild and can clearly see the same mistakes going on there as well.
During this talk I'll show some basic site building tips as well as some more complex and technical strategies that will make your Drupal sites better and more maintainable. Rather than just show you what to do, I'll also be explaining why doing those things are important and how developers and their websites will benefit from them. Although I'll be mainly concentrating on Drupal 7, some of these techniques are also applicable to Drupal 8.
WP-CLI is an awesome WordPress plugin that can be used to automate a bunch of difficult WordPress tasks. This presentation walks you through basic WP-CLI commands and creating custom commands.
Drupal 8 Configuration Management with FeaturesNuvole
Configuration Management is one of the prominent new features coming with Drupal 8. The reference use case for Configuration Management in Drupal 8 is quite different than the standard Drupal 7 + Features use case, both for a site builder and for a developer. And the Features module in Drupal 8 will have to be used in a different way.
Drupal is an open source content management system (CMS) written in PHP. It is a publishing platform and used to create blog and enterprise applications. Drupal gives a strong base for organizing, structuring, creating, developing and managing web presence. Drupal has standard structure which makes it easier to access basic functionalities and source code to anyone who wants to work on it. It comes with multiple user features which allow creating multiple users and each can be assigned different roles and permission. Drupal has thousands of add-on modules and designs which enable to you to create a unique website that you desire. Its PHP based platform allows the safe and secure management of websites.
10 things every developer should know about their database to run word press ...Otto Kekäläinen
Talk from WordCamp Barcelona 2018
https://2018.barcelona.wordcamp.org/session/10-things-every-developer-should-know-about-their-database-to-run-wordpress-optimally/
The database is perhaps the most important piece of your infrastructure. The database contains all your important e-commerce data and must be kept secured. The database performance often defines the overall performance of your WordPress site. In this talk I the most important things every WordPress developer should know about MariaDB/MySQL to be able to build and operate their site optimally.
This talk is about optimizing your ruby and rails code. It focuses on the basics. Too many times people focus on using fun tools. Before you attack the fun stuff you should tackle the low hanging fruit. ror-e.com
This ppt provide information about:
1. Database basics,
2. Indexes,
3. PHP MyAdmin Connect & Pconnect,
4. MySQL Create,
5. MySQL Insert,
6. MySQL Select,
7. MySQL Update,
8. MySQL Delete,
9. MySQL Truncate,
10. MySQL Drop
PHP classes in mumbai, Introduction to PHP/MYSQL..
best PHP/MYSQL classes in mumbai with job assistance.
our features are:
expert guidance by IT industry professionals
lowest fees of 5000
practical exposure to handle projects
well equiped lab
after course resume writing guidance
For more Visit: http://vibranttechnologies.co.in/php-classes-in-mumbai.html or http://phptraining.vibranttechnologies.co.in
So, you know how to deploy your code, what about your database? This talk will go through deploying your database with LiquiBase and DBDeploy a non-framework based approach to handling migrations of DDL and DML.
A short course I had few weeks ago that I wanted to share with you. All the MySQL issues from basics to experts: tuning, ERD, DDL, DML, Backup, Security
How to improve your workflows via SSH gateway. Experts at WP Engine help you learn about how WordPress developers can make their work more efficient using WP-CLI via SSH gateway to improve workflows.
On-demand webinar: https://hs.wpengine.com/webinar-improve-workflows-SSH-gateway
BITS: Introduction to MySQL - Introduction and InstallationBITS
BITS: Introduction to relational databases and MySQL - Module 1: Introduction and Installation
See
http://www.bits.vib.be/index.php?option=com_content&view=article&id=17204047:green-basics-of-databases&catid=81:training-pages&Itemid=190
Have you ever cried yourself to sleep unable to find the cause of a horrendous bug in your WordPress site? Cry no more, your tears will be reshaped as blinding swords as we explore uncharted territories laced with mystical creatures.
Debugging is an often avoided topic due to the uncertainty of how best to accomplish it and the lack of powerful introspective tools. This talk will explore new territory and showcase tools that help you debug complex and difficult issues in your WordPress site.
Word press interview question and answer tops technologiesTOPS Technologies
Dehradun Office
96/2 Haridwar Road,
(in front of LIC office),
Dharampur,
Dehradun,
Uttarakhand.
http://www.tops-int.com/live-project-training-php.html
Most experienced IT Training Institute in Dehradun known for providing PHP course as per Industry Standards and Requirement.
Similar to 13 things every developer should know about their database to run word press optimally (20)
Presentation from webinar held on August 19th, 2020, with Xdebug developer Derick Rethans and Seravo CEO Otto Kekäläinen.
This presentation shows you how to use Xdebug (which is very easy with the Seravo WordPress development environment!) to make a record of what the WordPress PHP code does during a website page load, and how to use that information to optimize the performance of your WordPress site.
For a video recording and Dericks presentation see https://seravo.com/blog/webinar-xdebug-profile-php/
Optimizing WordPress PHP performance with TidewaysSeravo
Otto Kekäläinen, the code-loving CEO of Seravo, and Benjamin Eberlei, the founder of Tideways, held a webinar on June 4, 2020, where they discussed PHP performance optimization and how to get rid of performance bottlenecks in a WordPress environment.
Less and faster – Cache tips for WordPress developersSeravo
Otto Kekäläinen, the code-loving CEO of Seravo held a webinar on May 12, 2020, that focused on the cache: what should a WordPress developer know and which are the best practices to follow?
Vähemmän ja nopeammin – Välimuistivinkit WordPress-kehittäjilleSeravo
Seravon koodaava toimitusjohtaja Otto Kekäläinen kertoi 29.4.2020 järjestetyssä webinaarissa mitä jokaisen WordPress-kehittäjän kannattaa tietää välimuisteista.
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBrad Spiegel Macon GA
Brad Spiegel Macon GA’s journey exemplifies the profound impact that one individual can have on their community. Through his unwavering dedication to digital inclusion, he’s not only bridging the gap in Macon but also setting an example for others to follow.
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesSanjeev Rampal
Talk presented at Kubernetes Community Day, New York, May 2024.
Technical summary of Multi-Cluster Kubernetes Networking architectures with focus on 4 key topics.
1) Key patterns for Multi-cluster architectures
2) Architectural comparison of several OSS/ CNCF projects to address these patterns
3) Evolution trends for the APIs of these projects
4) Some design recommendations & guidelines for adopting/ deploying these solutions.
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC
Ellisha Heppner, Grant Management Lead, presented an update on APNIC Foundation to the PNG DNS Forum held from 6 to 10 May, 2024 in Port Moresby, Papua New Guinea.
This 7-second Brain Wave Ritual Attracts Money To You.!nirahealhty
Discover the power of a simple 7-second brain wave ritual that can attract wealth and abundance into your life. By tapping into specific brain frequencies, this technique helps you manifest financial success effortlessly. Ready to transform your financial future? Try this powerful ritual and start attracting money today!
1.Wireless Communication System_Wireless communication is a broad term that i...JeyaPerumal1
Wireless communication involves the transmission of information over a distance without the help of wires, cables or any other forms of electrical conductors.
Wireless communication is a broad term that incorporates all procedures and forms of connecting and communicating between two or more devices using a wireless signal through wireless communication technologies and devices.
Features of Wireless Communication
The evolution of wireless technology has brought many advancements with its effective features.
The transmitted distance can be anywhere between a few meters (for example, a television's remote control) and thousands of kilometers (for example, radio communication).
Wireless communication can be used for cellular telephony, wireless access to the internet, wireless home networking, and so on.
1.Wireless Communication System_Wireless communication is a broad term that i...
13 things every developer should know about their database to run word press optimally
1. 13 Things
Every Developer
Should Know About
Their Database to
Run WordPress
Optimally
WordCamp Europe 2020
Otto Kekäläinen
@ottokekalainen
seravo.com
2. ● Linux and open source advocate
● Written WP themes and plugins,
contributed to WordPress Core,
MySQL, MariaDB…
● CEO, sysadmin and developer at
Seravo.com – WordPress
hosting and upkeep
Otto Kekäläinen
4. The database is involved in both!
○ contains all your valuable data
○ often the bottleneck of performance
Common Issues in WordPress:
Security & Speed
6. TIP #1: MAKE (USE OF) DB DUMPS
Benefits
● Copying your WordPress files is not enough for a
backup
● The database dump file format is
○ plain-text: view and modify it as much as you like
○ interoperable: import it into a MySQL or MariaDB
database server anywhere
Command line: mysqldump or wp db export
7. TIP #1: MAKE (USE OF) DB DUMPS
$ wp db export --skip-extended-insert --allow-root --single-transaction
example-after.sql
$ diff -u example-before.sql example-after.sql
--- example-before.sql 2018-08-30 10:58:23.243836204 +0300
+++ example-after.sql 2018-08-30 10:57:57.771762687 +0300
@@ -2,3 +2,4 @@
INSERT INTO `wp_terms` VALUES (70,'transients','transients',0,0);
INSERT INTO `wp_terms` VALUES (71,'code','code',0,0);
INSERT INTO `wp_terms` VALUES (72,'performance','performance',0,0);
+INSERT INTO `wp_terms` VALUES (73,'WordPress','wordpress',0,0);
What are these tables and columns? See
codex.wordpress.org/Database_Description
8. TIP #2: LEARN WP-CLI DB COMMANDS
List them all with wp db --help
My most used ones:
● wp db export/import
● wp db size --tables --all-tables --size_format=mb
● wp db cli
● wp db search --one_line
● wp search-replace --all-tables http://example.com
https://example.com
^ My favourite!
9. TIP #3: USE ADMINER TO BROWSE
● Adminer is one file, easy to install and update
● Less security vulnerabilities than in PHPMyAdmin
10. TIP #4: WP_OPTIONS AND AUTOLOAD
● Every single WordPress page load runs this query
SELECT * FROM wp_options WHERE autoload = 'yes'
11. TIP #4: WP_OPTIONS AND AUTOLOAD
● If wp_options table is larger than 1 MB, try to clean it up
● Find rows with the largest amount of data in the option_value
field:
○ SELECT option_name, length(option_value) FROM
wp_options WHERE autoload='yes' ORDER BY
length(option_value) DESC LIMIT 30
● File bugs against stupid plugins polluting your options table
● If cannot be cleaned, add an index on autoload
○ CREATE INDEX autoloadindex ON wp_options(autoload,
option_name)
12. TIP #5: WP_POSTMETA BLOAT
● Any site using custom post types or WooCommerce is likely to have a
big wp_postmeta table. While every post adds just one new row (and
many fields) to the database and keeping the number of column names
constant, the use of add_post_meta() calls will bloat the database with
tens or hundreds of rows per post where each row only contains two
fields: name and value.
● Find the meta_key naming patterns with most amount of rows:
○ SELECT substring(meta_key, 1, 20) AS
key_start, count(*) AS count FROM
wp_postmeta GROUP BY key_start
ORDER BY count DESC LIMIT 30
13. Unfortunately database bloat
and stupid use of database is
common in plugins.
We need to do more to raise
awareness about database
best practices!
14. TIP #6: LEARN SQL
● It is not enough that you know PHP, learn SQL as well.
● The database has 20 years of engineering on how to fetch a
small set of data from a huge set of data as quickly as
possible. Don’t try to reinvent that in PHP.
● Don’t put everything in wp_postmeta. Don’t be afraid of
creating your own custom tables that have the correct
columns, relations and indexes already defined.
● Learn what ‘index’ means and why you don’t want to be
causing ‘full table scans’ in the database.
15. TIP #7: BUT DON’T USE SQL DIRECTLY
● In WordPress PHP code use get_posts() for basics
● Use the WP_Query class for more advanced cases
● When WP_Query does not fit, use the $wpdb->get_row(),
$wpdb->insert() etc methods
● If you really need raw
SQL, don’t access the
database directly,
instead use
$wpdb->prepare() and
$wpdb->query() to
avoid SQL injection
vulnerabilities
16. TIP #8: CONFIGURE DATABASE SERVER
1. MariaDB preferred over Oracle MySQL
2. Use a recent version (MariaDB 10.3+)
3. Storage engine: InnoDB (not MyISAM)
4. Character set: UTFMB4 (for emojis )
5. Collation: your local sorting order A-Ö
6. ..and optimize all the other settings
Or hire a database administrator, or use a
WordPress hosting company that does this for you.
17. Reasons to
switch to
MariaDB
● MariaDB development is more open
and vibrant
● Quicker and more transparent
security releases
● More cutting edge features
● More storage engines
● Better performance for WP
● Galera active-active master
clustering
● Oracle stewardship is uncertain
● MariaDB has leapt in popularity
● Compatible and easy to migrate
https://seravo.fi/2015/10-reasons-to-migrate-t
o-mariadb-if-still-using-mysql
18. TIP #9: TRANSIENTS AND OBJECT CACHE
● Use Redis cache or similar
to store transients and
sessions so they can be
removed from wp_options
// Simple WP Transient API example
if ( ! $result = get_transient( ‘q_result’ ) ) {
$result = run_complex_and_slow_query();
set_transient( ‘q_result’, $result, 3600 );
}
echo $result;
● Redis and WP Transients
API will ease the load on
the database and help you
make super fast sites
19. TIP #10: MONITOR PERFORMANCE
● Take a peek with
SHOW PROCESSLIST;
● Analyse unusual slowness by
enabling mariadb-slow.log
logging
● Enable Tideways or similar
service for sampling your
WordPress site PHP execution in
production to find bottlenecks
20. AND ONE EXTRA TIP:
NEVER PUSH YOUR DEV
DATABASE INTO PRODUCTION
21. TIP #11: DB CLEANUP
● DELETE FROM `wp_posts` WHERE post_type =
'revision' AND post_date NOT LIKE '2018-%';
● DELETE FROM wp_options WHERE option_name
LIKE ('_transient_%') OR option_name LIKE
('_site_transient_%');
● Checkout what
wp-content/plugins/*/uninstall.php contains and
what plugins are supposed to clean away if they
are uninstalled
22. TIP #12: EXPLAIN, PLEASE
● You can append ‘EXPLAIN’ to any query and the
optimizer will tell how it is running the query
● EXPLAIN SELECT * FROM wp_options WHERE
autoload = 'yes';
MariaDB [wp_palvelu_06a4ad]> explain SELECT * FROM wp_options WHERE autoload = 'yes';
+------+-------------+------------+------+---------------+------+---------+------+------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+------+-------------+------------+------+---------------+------+---------+------+------+-------------+
| 1 | SIMPLE | wp_options | ALL | NULL | NULL | NULL | NULL | 415 | Using where |
+------+-------------+------------+------+---------------+------+---------+------+------+-------------+
23. TIP #13: TEST WITH DUMMY DATA
● While developing a site, load lots of dummy data into it so you
can test how your site looks and performs with 100, 1000 or 100
000 posts.
● Basic: Import themeunittestdata.wordpress.xml
○ codex.wordpress.org/Theme_Unit_Test
● More data: wp post generate
○ curl http://loripsum.net/api/5 |
wp post generate --post_content --count=10
● More realism: wp-cli-fixtures
○ github.com/nlemoine/wp-cli-fixtures
25. See also
Make Your Site Faster with Caching
https://seravo.com/blog/wordpress-cache/
300% faster WordPress load times with transients
https://seravo.com/blog/faster-wordpress-with-transients/
5 common reasons why your WordPress site is slow
https://youtu.be/8sJExUO-U4A
Improving WordPress Performance with XDebug and PHP Profiling
https://youtu.be/oKcIS5A-6_c