{"id":90603,"date":"2022-06-19T19:28:28","date_gmt":"2022-06-19T17:28:28","guid":{"rendered":"https:\/\/rmarketingdigital.com\/wordpress\/consultas-sql-que-ahorran-tiempo-para-wordpress\/"},"modified":"2021-03-03T13:22:47","modified_gmt":"2021-03-03T16:22:47","slug":"consultas-sql-que-ahorran-tiempo-para-wordpress","status":"publish","type":"post","link":"https:\/\/rmarketingdigital.com\/en\/wordpress\/consultas-sql-que-ahorran-tiempo-para-wordpress\/","title":{"rendered":"Time-saving SQL queries for WordPress"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_86 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/rmarketingdigital.com\/en\/wordpress\/consultas-sql-que-ahorran-tiempo-para-wordpress\/#Primeros-pasos\" >First steps<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/rmarketingdigital.com\/en\/wordpress\/consultas-sql-que-ahorran-tiempo-para-wordpress\/#Reemplazar-URL\" >Replace URL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/rmarketingdigital.com\/en\/wordpress\/consultas-sql-que-ahorran-tiempo-para-wordpress\/#Crear-nuevo-usuario-administrador\" >Create new administrator user<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/rmarketingdigital.com\/en\/wordpress\/consultas-sql-que-ahorran-tiempo-para-wordpress\/#Cambiar-nombre-de-usuario-de-inicio-de-sesion-de-administrador\" >Change admin login username<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/rmarketingdigital.com\/en\/wordpress\/consultas-sql-que-ahorran-tiempo-para-wordpress\/#Cambiar-contrasena-de-administrador\" >Change admin password<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/rmarketingdigital.com\/en\/wordpress\/consultas-sql-que-ahorran-tiempo-para-wordpress\/#Borrar-spam\" >Clear spam<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/rmarketingdigital.com\/en\/wordpress\/consultas-sql-que-ahorran-tiempo-para-wordpress\/#Borrar-todos-los-comentarios-de-publicaciones-no-aprobados\" >Delete all comments on unapproved posts<\/a><\/li><\/ul><\/nav><\/div>\n<div class=\"container-med\">\n<div class=\"entry atype\">\n<p>If you are a WordPress website owner, there are a lot of things to take care of.<\/p>\n<p>Constantly updating your blog content, adding new products, changing prices, and we didn&#039;t even mention regular plugin updates, providing access to a developer, and doing a lot more as part of your daily WordPress routine.<\/p>\n<p>Sometimes if you need to modify the settings, you will find a long web page tutorial with many instructions to perform a single action. But what if you knew that most of these changes can be changed with a simple SQL query, a command that you run from your database administrator menu?<\/p>\n<p>Since you are a busy person and saving time is a priority, here are the basic SQL queries that will help you reach the results in a few minutes.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Primeros-pasos\"><\/span>First steps<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>When there is more than one website on your hosting account, before running SQL queries, you must ensure that you are modifying the correct database. You can find the database name assigned to a specific WordPress installation in your <em>wp-config.php<\/em> file in string:<\/p>\n<pre>define (&#039;DB_NAME&#039;, &#039;yourdbname&#039;)<\/pre>\n<p><img alt='sql-define-db-name-6873583' loading=\"lazy\" class=\"alignnone\" src='https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-define-db-name-6873583.png' width=\"737\" height=\"260\"><\/p>\n<p>At the same time, pay attention to the table prefix, as you will need to specify it once you run the SQL commands. It&#039;s in the same file at the bottom of the page settings.<\/p>\n<p><img alt='sql-table-refix-4670415' loading=\"lazy\" class=\"alignnone\" src='https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-table-refix-4670415.png' width=\"657\" height=\"67\"><\/p>\n<p>In this example above, the database name is _wp622. The table prefix is wpc7_. Now when we know, let&#039;s go to the database administrator. Most control panels use PHPMyAdmin for database management.<\/p>\n<p><img alt='sql-phpmyadmin-5270821' loading=\"lazy\" class=\"alignnone\" src='https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-phpmyadmin-5270821.png' width=\"892\" height=\"215\"><\/p>\n<p>Once there, find your database name in the list and click on it:<\/p>\n<p><img alt='sql-phpmyadmin-select-db-2454817' loading=\"lazy\" class=\"alignnone\" src='https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-phpmyadmin-select-db-2454817.png' width=\"1306\" height=\"625\"><\/p>\n<p>Before making any changes, be sure to create a backup for this database, so that you can quickly restore it in case something goes wrong.<\/p>\n<p>We cover how to backup WordPress in detail in our general backup guide. But to give you a quick tour, choose the <em>To export<\/em> option, choose the method and format according to your needs and press <em>Go<\/em> (here we have configured all the default options):<\/p>\n<p><img alt='sql-phpmyadmin-export-db-2882786' loading=\"lazy\" class=\"alignnone\" src='https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-phpmyadmin-export-db-2882786.png' width=\"910\" height=\"562\"><\/p>\n<p>Once this is done, you can continue. Press the menu <em>SQL<\/em> and let&#039;s start:<\/p>\n<p><img alt='sql-db-menu-4391261' loading=\"lazy\" class=\"alignnone\" src='https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-db-menu-4391261.jpg' width=\"1000\" height=\"285\"><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Reemplazar-URL\"><\/span>Replace URL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If you plan to update your website URL by adding the SSL certificate to your website or making other modifications, be sure to use the following command:<\/p>\n<pre class=\"prism-pre line-numbers language-sql\"><code class=\"language-sql\">UPDATE wp_options SET option_value = replace (option_value, &#039;http:\/\/www.oldurlofthewebsite.com&#039;, &#039;http:\/\/www.newurlofthewebsite.com&#039;) WHERE option_name = &#039;home&#039; OR option_name = &#039;siteurl&#039;;<\/code><\/pre>\n<p>Let&#039;s say I want my URL to be https \/\/: and my domain name is example.com. In this case, I need to modify the table name wp_options and the same url:<\/p>\n<pre class=\"prism-pre line-numbers language-sql\"><code class=\"language-sql\">UPDATE wpc7_options SET option_value = replace (option_value, &#039;http:\/\/www.example.com&#039;, &#039;https:\/\/www.example.com&#039;) WHERE option_name = &#039;home&#039; OR option_name = &#039;siteurl&#039;;<\/code><\/pre>\n<p><img alt='sql-replace-sitename-7368149' loading=\"lazy\" class=\"alignnone\" src='https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-replace-sitename-7368149.jpg' width=\"1000\" height=\"291\"><\/p>\n<p>And wait for a success message.<\/p>\n<p><img alt='sql-success-message-9588188' loading=\"lazy\" class=\"alignnone\" src='https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-success-message-9588188.png' width=\"1199\" height=\"97\"><\/p>\n<p>Why is it so important to see it? If you press <em>Go<\/em> But there are some errors in the query, the system will not be able to fulfill the request and you will get errors that means the execution failed. The error will look like this and will indicate the reason why the process failed.<\/p>\n<p><img alt='sql-error-message-9853633' loading=\"lazy\" class=\"alignnone\" src='https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-error-message-9853633.png' width=\"1237\" height=\"248\"><\/p>\n<p>Note that this command is basic and will replace only the main URL of your website, so if you plan to change the domain name of your website from example.com to test.net, you will need to modify it including all tables where it is your website url such as wp-posts, wp-postmeta and at the same time be careful with tables with rows containing plugin generated urls (for example WooCommerce).<\/p>\n<p>To do that, you will need at least <a rel=\"nofollow noopener noreferrer\" target=\"_blank\" href=\"https:\/\/www.udemy.com\/topic\/sql\">basic SQL training<\/a>. One more option would be to open the database you exported in any text editor and with Ctrl + H replace all the mentions of your old domain with the new one. If this sounds too complicated, there are a range of other tools that help automate this operation (such as the <a rel=\"nofollow noopener noreferrer\" target=\"_blank\" href=\"https:\/\/interconnectit.com\/products\/search-and-replace-for-wordpress-databases\/\">interconnect \/ search and replace it database<\/a> script, or the <a rel=\"nofollow noopener noreferrer\" target=\"_blank\" href=\"https:\/\/wordpress.org\/plugins\/better-search-replace\/\">Best search and replace plugin<\/a> based on the same script) while simply uploading the file to your website folder for the job site and opening it in a browser.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Crear-nuevo-usuario-administrador\"><\/span>Create new administrator user<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If you need to add a new user with administrator role to your installation, you will need to use the following command and modify it according to your preferences:<\/p>\n<pre class=\"prism-pre line-numbers language-sql\"><code class=\"language-sql\">INSERT INTO `wp_users` (` user_login`, `user_pass`,` user_nicename`, `user_email`,` user_status`) VALUES (&#039;yourlogin&#039;, MD5 (&#039;yourpassword&#039;), &#039;firstname lastname&#039;,&#039;email@example.com &#039;,&#039; 0 &#039;); INSERT INTO `wp_usermeta` (` umeta_id`, `user_id`,` meta_key`, `meta_value`) VALUES (NULL, (Select max (id) FROM wp_users), &#039;wp_capabilities&#039;,&#039; a: 1: {s: 13: &quot;administrator&quot;; s: 1: &quot;1&quot;;} &#039;); INSERT INTO `wp_usermeta` (` umeta_id`, `user_id`,` meta_key`, `meta_value`) VALUES (NULL, (Select max (id) FROM wp_users), &#039;wp_user_level&#039;, &#039;10&#039;);<\/code><\/pre>\n<p>Note that you will need to modify the tables and login values based on your <strong>Username<\/strong> and <strong>databases<\/strong>.<\/p>\n<p>I want to create a user <em>my developer<\/em> with the password <em>my password<\/em>, my developer&#039;s name is <em>John doe<\/em> and the email is <em>test@test.com<\/em>. So my query will look like this:<\/p>\n<pre class=\"prism-pre line-numbers language-sql\"><code class=\"language-sql\">INSERT INTO `wpc7_users` (` user_login`, `user_pass`,` user_nicename`, `user_email`,` user_status`) VALUES (&#039;Mydev&#039;, MD5 (&#039;mypassword&#039;), &#039;John Doe&#039;,&#039;test@test.com &#039;,&#039; 0 &#039;); INSERT INTO `wpc7_usermeta` (` umeta_id`, `user_id`,` meta_key`, `meta_value`) VALUES (NULL, (Select max (id) FROM wp_users), &#039;wp_capabilities&#039;,&#039; a: 1: {s: 13: &quot;administrator&quot;; s: 1: &quot;1&quot;;} &#039;); INSERT INTO `wpc7_usermeta` (` umeta_id`, `user_id`,` meta_key`, `meta_value`) VALUES (NULL, (Select max (id) FROM wpc7_users), &#039;wp_user_level&#039;, &#039;10&#039;<\/code><\/pre>\n<p><img alt='sql-create-new-user-1388785' loading=\"lazy\" class=\"alignnone\" src='https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-create-new-user-1388785.png' width=\"1600\" height=\"414\"><\/p>\n<p>Note that I don&#039;t need to modify the row names (in other words, <em>wp_user_level<\/em> or play with numbers <em>0, 10, 13<\/em> since they refer to the user role and the corresponding rights. Once done, I press <em>Go<\/em>.<\/p>\n<p>The output should show successful results like the following:<\/p>\n<p><img alt='sql-create-new-user-results-1263047' loading=\"lazy\" class=\"alignnone\" src='https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-create-new-user-results-1263047.png' width=\"1600\" height=\"466\"><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Cambiar-nombre-de-usuario-de-inicio-de-sesion-de-administrador\"><\/span>Change admin login username<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To change the login name of the username, go back to the MySQL tab and run the following command:<\/p>\n<pre class=\"prism-pre line-numbers language-sql\"><code class=\"language-sql\">UPDATE wp_users SET user_login = &#039;newlogin&#039; WHERE user_login = &#039;admin&#039;;<\/code><\/pre>\n<p>Let&#039;s say your default username is <em>my developer<\/em>, the one you created before and want to configure <em>safe user<\/em> instead. In our particular case, we execute the following command, since at the same time we have the default prefix wp7c_:<\/p>\n<pre class=\"prism-pre line-numbers language-sql\"><code class=\"language-sql\">UPDATE wpc7_users_users SET user_login = &#039;secureduser&#039; WHERE user_login = &#039;mydeveloper&#039;;<\/code><\/pre>\n<p><img alt='sql-change-wp-username-2210462' loading=\"lazy\" class=\"alignnone\" src='https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-change-wp-username-2210462.png' width=\"1600\" height=\"413\"><\/p>\n<p>The successful result looks as follows:<\/p>\n<p><img alt='sql-change-wp-username-success-9370193' loading=\"lazy\" class=\"alignnone\" src='https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-change-wp-username-success-9370193.png' width=\"847\" height=\"205\"><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Cambiar-contrasena-de-administrador\"><\/span>Change admin password<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Following the security rules of regular password changes, you may at the same time want to change the password of your <em>safe user<\/em>. Here is the query for it:<\/p>\n<pre class=\"prism-pre line-numbers language-sql\"><code class=\"language-sql\">UPDATE wp_users SET user_pass = MD5 (&#039;new_password&#039;) WHERE user_login = &#039;youruser&#039;;<\/code><\/pre>\n<p>For this particular password change command, our command is as follows:<\/p>\n<pre class=\"prism-pre line-numbers language-sql\"><code class=\"language-sql\">UPDATE wpc7_users SET user_pass = MD5 (&#039;$tR0ngP @ s$w03D&#039;) WHERE user_login = &#039;secureduser&#039;;<\/code><\/pre>\n<p><img alt='sql-change-admin-pw-7050022' loading=\"lazy\" class=\"alignnone\" src='https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-change-admin-pw-7050022.png' width=\"1600\" height=\"415\"><\/p>\n<p>press <em>Go<\/em> and wait for the success message:<\/p>\n<p><img alt='sql-change-admin-pw-success-3161969' loading=\"lazy\" class=\"alignnone\" src='https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-change-admin-pw-success-3161969.png' width=\"833\" height=\"162\"><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Borrar-spam\"><\/span>Clear spam<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>For users who post a lot of posts and leave the comments open for interaction, the problem with spam comments can get really painful. Even though you can filter comments by manual approval, you probably want to find a way to quickly delete anything you haven&#039;t approved. That is how:<\/p>\n<pre class=\"prism-pre line-numbers language-sql\"><code class=\"language-sql\">DELETE FROM wp_comments WHERE wp_comments.comment_approved = &#039;spam&#039;;<\/code><\/pre>\n<p>When customized for the particular case we are discussing here:<\/p>\n<pre class=\"prism-pre line-numbers language-sql\"><code class=\"language-sql\">DELETE FROM wpc7_comments WHERE wpc7_comments.comment_approved = &#039;spam&#039;;<\/code><\/pre>\n<p><img alt='sql-delete-spam-9071402' loading=\"lazy\" class=\"alignnone\" src='https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-delete-spam-9071402.png' width=\"1600\" height=\"433\"><\/p>\n<p><strong>Note<\/strong>: the prefix must be modified in both places where it is, since <em>wp_comments.comment_approved<\/em> is the separate field of the table.<\/p>\n<p>Here is the successful result:<\/p>\n<p><img alt='sql-delete-spam-success-4936391' loading=\"lazy\" class=\"alignnone\" src='https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-delete-spam-sucess-4936391.png' width=\"815\" height=\"110\"><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Borrar-todos-los-comentarios-de-publicaciones-no-aprobados\"><\/span>Delete all comments on unapproved posts<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>At some point, you may find that you are tired of filtering and reading comments on articles before making the final decision to publish them, so you want to remove them. There is a command for that:<\/p>\n<pre class=\"prism-pre line-numbers language-sql\"><code class=\"language-sql\">DELETE FROM wp_comments WHERE comment_approved = 0<\/code><\/pre>\n<p>Note that the <em>comment_approved<\/em> The section does not need modification as this tab represents the default function in the table which is immutable.<\/p>\n<p>The modified command looks like this:<\/p>\n<pre class=\"prism-pre line-numbers language-sql\"><code class=\"language-sql\">DELETE FROM wpc7_comments WHERE comment_approved = 0<\/code><\/pre>\n<p><img alt='sql-delete-comments-8243094' loading=\"lazy\" class=\"alignnone\" src='https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-delete-comments-8243094.png' width=\"1600\" height=\"407\"><\/p>\n<p>Once done, you can see the usual output of successfully executed commands:<\/p>\n<p><img alt='sql-delete-comments-success-4521332' loading=\"lazy\" class=\"alignnone\" src='https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-delete-comments-success-4521332.png' width=\"789\" height=\"91\"><\/p>\n<hr>\n<p>While it may seem that following the instructions may take more time than simply doing things manually, it does not. The bigger your website, the more time you have to spend on it. A single action performed separately for 10 posts and you end up with 10 times more time spent executing.<\/p>\n<p>In fact, you save a ton of your precious time running these commands, and you can use this time on more important things, like planning content or finding inspirational ideas.<\/p>\n<p>Happy blogging!<\/p>\n<\/div>\n<p><script type=\"application\/ld+json\">{\n    \"@context\": \"http:\\\/\\\/schema.org\",\n    \"@type\": \"BlogPosting\",\n    \"mainEntityOfPage\": {\n        \"@type\": \"WebPage\",\n        \"@id\": \"https:\\\/\\\/www.wpexplorer.com\\\/sql-queries-wordpress\\\/\"\n    },\n    \"headline\": \"Time Saving SQL Queries for WordPress\",\n    \"image\": {\n        \"@type\": \"ImageObject\",\n        \"url\": \"https:\\\/\\\/www.wpexplorer.com\\\/wp-content\\\/uploads\\\/sql-wordpress-queries-tips.jpg\",\n        \"width\": 1000,\n        \"height\": 503\n    },\n    \"datePublished\": \"2020-05-05T14:47:01-06:00\",\n    \"dateModified\": \"2020-05-05T14:47:01-06:00\",\n    \"author\": {\n        \"type\": \"Person\",\n        \"name\": \"StewartDunlop\"\n    },\n    \"publisher\": {\n        \"@type\": \"Organization\",\n        \"name\": \"R Marketing Digital\",\n        \"logo\": {\n            \"@type\": \"ImageObject\",\n            \"url\": \"https:\\\/\\\/www.wpexplorer.com\\\/wp-content\\\/themes\\\/wpexplorer\\\/images\\\/wpexplorer-organization-logo.png\",\n            \"width\": 400,\n            \"height\": 60\n        }\n    },\n    \"description\": \"Save time with these SQL queries for WordPress. The commands can help you manage your website efficiently freeing up time for other important tasks.\"\n}<\/script><\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Si es propietario de un sitio web de WordPress, hay muchas cosas de las que ocuparse. Actualizando constantemente el contenido de su blog, agregando nuevos productos, cambiando los precios, y&#8230;<\/p>","protected":false},"author":1,"featured_media":90604,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1351],"tags":[],"class_list":["post-90603","post","type-post","status-publish","format-standard","has-post-thumbnail","category-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.0 (Yoast SEO v28.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Consultas SQL que ahorran tiempo para WordPress - R Marketing Digital<\/title>\n<meta name=\"description\" content=\"Si es propietario de un sitio web de WordPress, hay muchas cosas de las que ocuparse. Actualizando constantemente el contenido de su blog, agregando\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rmarketingdigital.com\/en\/wordpress\/time-saving-sql-queries-for-wordpress\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Consultas SQL que ahorran tiempo para WordPress\" \/>\n<meta property=\"og:description\" content=\"Si es propietario de un sitio web de WordPress, hay muchas cosas de las que ocuparse. Actualizando constantemente el contenido de su blog, agregando\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rmarketingdigital.com\/en\/wordpress\/time-saving-sql-queries-for-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"R Marketing Digital\" \/>\n<meta property=\"article:published_time\" content=\"2022-06-19T17:28:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-wordpress-queries-tips-8889502.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"503\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"R Marketing Digital\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/rmarketingdigital.com\\\/en\\\/wordpress\\\/time-saving-sql-queries-for-wordpress\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rmarketingdigital.com\\\/en\\\/wordpress\\\/time-saving-sql-queries-for-wordpress\\\/\"},\"author\":{\"name\":\"R Marketing Digital\",\"@id\":\"https:\\\/\\\/rmarketingdigital.com\\\/#\\\/schema\\\/person\\\/7c0d9782b2977b840b3740f00c69a73e\"},\"headline\":\"Consultas SQL que ahorran tiempo para WordPress\",\"datePublished\":\"2022-06-19T17:28:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/rmarketingdigital.com\\\/en\\\/wordpress\\\/time-saving-sql-queries-for-wordpress\\\/\"},\"wordCount\":1312,\"image\":{\"@id\":\"https:\\\/\\\/rmarketingdigital.com\\\/en\\\/wordpress\\\/time-saving-sql-queries-for-wordpress\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/rmarketingdigital.com\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/sql-wordpress-queries-tips-8889502.jpg\",\"articleSection\":[\"Wordpress\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rmarketingdigital.com\\\/en\\\/wordpress\\\/time-saving-sql-queries-for-wordpress\\\/\",\"url\":\"https:\\\/\\\/rmarketingdigital.com\\\/en\\\/wordpress\\\/time-saving-sql-queries-for-wordpress\\\/\",\"name\":\"Consultas SQL que ahorran tiempo para WordPress - R Marketing Digital\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rmarketingdigital.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/rmarketingdigital.com\\\/en\\\/wordpress\\\/time-saving-sql-queries-for-wordpress\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/rmarketingdigital.com\\\/en\\\/wordpress\\\/time-saving-sql-queries-for-wordpress\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/rmarketingdigital.com\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/sql-wordpress-queries-tips-8889502.jpg\",\"datePublished\":\"2022-06-19T17:28:28+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/rmarketingdigital.com\\\/#\\\/schema\\\/person\\\/7c0d9782b2977b840b3740f00c69a73e\"},\"description\":\"Si es propietario de un sitio web de WordPress, hay muchas cosas de las que ocuparse. Actualizando constantemente el contenido de su blog, agregando\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rmarketingdigital.com\\\/en\\\/wordpress\\\/time-saving-sql-queries-for-wordpress\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/rmarketingdigital.com\\\/en\\\/wordpress\\\/time-saving-sql-queries-for-wordpress\\\/#primaryimage\",\"url\":\"https:\\\/\\\/rmarketingdigital.com\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/sql-wordpress-queries-tips-8889502.jpg\",\"contentUrl\":\"https:\\\/\\\/rmarketingdigital.com\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/sql-wordpress-queries-tips-8889502.jpg\",\"width\":1000,\"height\":503,\"caption\":\"sql-wordpress-queries-tips-8889502-4351895-jpg\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/rmarketingdigital.com\\\/#website\",\"url\":\"https:\\\/\\\/rmarketingdigital.com\\\/\",\"name\":\"R Marketing Digital\",\"description\":\"Agencia SEO | Publicidad redes sociales | Community Management\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/rmarketingdigital.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/rmarketingdigital.com\\\/#\\\/schema\\\/person\\\/7c0d9782b2977b840b3740f00c69a73e\",\"name\":\"R Marketing Digital\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c5599c203e0120b8ccbff4666af86f35f9b3dcad468a8bc6295313a3964a80be?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c5599c203e0120b8ccbff4666af86f35f9b3dcad468a8bc6295313a3964a80be?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c5599c203e0120b8ccbff4666af86f35f9b3dcad468a8bc6295313a3964a80be?s=96&d=mm&r=g\",\"caption\":\"R Marketing Digital\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SQL queries that save time for WordPress - R Marketing Digital","description":"If you are a WordPress website owner, there are a lot of things to take care of. Constantly updating the content of your blog, adding","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/rmarketingdigital.com\/en\/wordpress\/time-saving-sql-queries-for-wordpress\/","og_locale":"en_US","og_type":"article","og_title":"Consultas SQL que ahorran tiempo para WordPress","og_description":"Si es propietario de un sitio web de WordPress, hay muchas cosas de las que ocuparse. Actualizando constantemente el contenido de su blog, agregando","og_url":"https:\/\/rmarketingdigital.com\/en\/wordpress\/time-saving-sql-queries-for-wordpress\/","og_site_name":"R Marketing Digital","article_published_time":"2022-06-19T17:28:28+00:00","og_image":[{"width":1000,"height":503,"url":"https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-wordpress-queries-tips-8889502.jpg","type":"image\/jpeg"}],"author":"R Marketing Digital","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rmarketingdigital.com\/en\/wordpress\/time-saving-sql-queries-for-wordpress\/#article","isPartOf":{"@id":"https:\/\/rmarketingdigital.com\/en\/wordpress\/time-saving-sql-queries-for-wordpress\/"},"author":{"name":"R Marketing Digital","@id":"https:\/\/rmarketingdigital.com\/#\/schema\/person\/7c0d9782b2977b840b3740f00c69a73e"},"headline":"Consultas SQL que ahorran tiempo para WordPress","datePublished":"2022-06-19T17:28:28+00:00","mainEntityOfPage":{"@id":"https:\/\/rmarketingdigital.com\/en\/wordpress\/time-saving-sql-queries-for-wordpress\/"},"wordCount":1312,"image":{"@id":"https:\/\/rmarketingdigital.com\/en\/wordpress\/time-saving-sql-queries-for-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-wordpress-queries-tips-8889502.jpg","articleSection":["Wordpress"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/rmarketingdigital.com\/en\/wordpress\/time-saving-sql-queries-for-wordpress\/","url":"https:\/\/rmarketingdigital.com\/en\/wordpress\/time-saving-sql-queries-for-wordpress\/","name":"SQL queries that save time for WordPress - R Marketing Digital","isPartOf":{"@id":"https:\/\/rmarketingdigital.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rmarketingdigital.com\/en\/wordpress\/time-saving-sql-queries-for-wordpress\/#primaryimage"},"image":{"@id":"https:\/\/rmarketingdigital.com\/en\/wordpress\/time-saving-sql-queries-for-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-wordpress-queries-tips-8889502.jpg","datePublished":"2022-06-19T17:28:28+00:00","author":{"@id":"https:\/\/rmarketingdigital.com\/#\/schema\/person\/7c0d9782b2977b840b3740f00c69a73e"},"description":"If you are a WordPress website owner, there are a lot of things to take care of. Constantly updating the content of your blog, adding","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rmarketingdigital.com\/en\/wordpress\/time-saving-sql-queries-for-wordpress\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rmarketingdigital.com\/en\/wordpress\/time-saving-sql-queries-for-wordpress\/#primaryimage","url":"https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-wordpress-queries-tips-8889502.jpg","contentUrl":"https:\/\/rmarketingdigital.com\/wp-content\/uploads\/2020\/09\/sql-wordpress-queries-tips-8889502.jpg","width":1000,"height":503,"caption":"sql-wordpress-queries-tips-8889502-4351895-jpg"},{"@type":"WebSite","@id":"https:\/\/rmarketingdigital.com\/#website","url":"https:\/\/rmarketingdigital.com\/","name":"R Digital Marketing","description":"SEO Agency | Advertising social networks | Community Management","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rmarketingdigital.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/rmarketingdigital.com\/#\/schema\/person\/7c0d9782b2977b840b3740f00c69a73e","name":"R Digital Marketing","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c5599c203e0120b8ccbff4666af86f35f9b3dcad468a8bc6295313a3964a80be?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c5599c203e0120b8ccbff4666af86f35f9b3dcad468a8bc6295313a3964a80be?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c5599c203e0120b8ccbff4666af86f35f9b3dcad468a8bc6295313a3964a80be?s=96&d=mm&r=g","caption":"R Marketing Digital"}}]}},"_links":{"self":[{"href":"https:\/\/rmarketingdigital.com\/en\/wp-json\/wp\/v2\/posts\/90603","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rmarketingdigital.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rmarketingdigital.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rmarketingdigital.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rmarketingdigital.com\/en\/wp-json\/wp\/v2\/comments?post=90603"}],"version-history":[{"count":0,"href":"https:\/\/rmarketingdigital.com\/en\/wp-json\/wp\/v2\/posts\/90603\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rmarketingdigital.com\/en\/wp-json\/wp\/v2\/media\/90604"}],"wp:attachment":[{"href":"https:\/\/rmarketingdigital.com\/en\/wp-json\/wp\/v2\/media?parent=90603"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rmarketingdigital.com\/en\/wp-json\/wp\/v2\/categories?post=90603"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rmarketingdigital.com\/en\/wp-json\/wp\/v2\/tags?post=90603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}