I’m not going to tell you about what will happen. I’ll here give you an example on how you can run that piece of sql without phpMyadmin. Add this to your functions.php for temporary purpose. Not to forget about removing this after one run of your website.
$mymeta="_my_first_meta";
$wpdb->query(
$wpdb->prepare("CREATE INDEX wp_postmeta_my_first_meta ON wp_postmeta (%s)",$mymeta)
);
Don’t forget to replace your Database Prefix with “wp_“
Related Posts:
- Inserting Post Meta From SQL
- How to execute mulitple statement SQL queries using $wpdb->query?
- Delete duplicate rows from wordpress database where a column is duplicate in phpmyadmin
- Query WordPress database by registered date and role
- Size article thumbnails and retrieve them directly from database
- wpdb_prepare with multiple or condition
- SQL Error wp_commentmeta – incorrect table definition
- WordPress and MySQL: how to transfer Meta_key and Meta_Value from one post_id to another
- How do I get the posts within a certain year/date(with sql query)?
- Create table from array with prepare
- Why this query is not showing any result on wordpresss home page?
- Why does changing Database Table Prefixes result in loss of content?
- SQL query to set posts in bulk based on the post content
- $wpdb->get_var – What value is returned when zero records are found?
- DB prefix not updating
- I wanted to Know that how can I give ingore to 0000-00-00 in my config file
- Delete all users meta that named: user_avatar
- The MySQL Connection could not be established., before it was joomla but i have change it into worpress
- Migrated to Namecheap, now Trouble with Database & wp-config [closed]
- export individual posts to text files or a single csv file
- SQL query : Select a thumbnail for a media
- why you don’t Implement PDO for access every thing to database
- SQL Query to get post_id from wp_posts and and meta_key(s) from wp_postmeta
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- Case statement in MySQL
- Oracle SQL query for Date format
- Failed to connect to mysql at 127.0.0.1:3306 with user root access denied for user ‘root’@’localhost'(using password:YES)
- Error: Duplicate entry ‘0’ for key ‘PRIMARY’
- Using wpdb to connect to a separate database
- WPDB Insert or if exists Update
- The MySQL alternatives: Do Percona Server and MariaDB work well with WordPress, and do they make WordPress go better?
- wpdb->insert multiple record at once
- How to define composite keys with dbDelta()
- WordPress for a very large website
- WooCommerce with thousands of products – site is very slow – optimize db queries? [closed]
- How to Join two tables from separate databases within WordPress
- Change SQL get_results to search for posts with custom term in custom taxonomy
- Error establishing a database connection – with Debug Data
- wpdb query on custom table not working [closed]
- Database with mixed collation (utf8mb4 & utf8_general_ci)
- Help running a MySQL query to update all wp_#_options tables in a Multisite install
- Using table lock with wp_insert_post?
- Set Display Name to first and last name (phpmyadmin SQL Query)
- Is it safe to convert tables from MyISAM to InnoDB?
- Migrating database / content of non-CMS site to WordPress
- Does WordPress ever need multiple databases?
- Why are no posts showing despite my apparently correct DB restoration?
- How to query the WordPress database to get posts of a certain custom post type, taxonomy and field?
- Delete all post meta except featured image Using SQL
- How do I properly update the WordPress database password?
- Adding new row to wp_post table
- How do I find which articles are missing a featured image in The WordPress database?
- WordPress Install and Database on separate hosting?
- WordPress database error – Error in SQL syntax – I can’t identify any error?
- Database Tables Lost Indexes? How to Recover?
- Setup private content for specific users with daily updates [closed]
- Migration: Copying database content to a different server
- Call to undefined function get_user_meta() – trying to access data in MySQL from custom fields
- Which data is written and stored in the database when read-only (non-posting, non-commenting) users visit the site?
- Duplicated site isn’t recognized as a site
- Query multiple tables at once?
- Have working sql query… trying to adjust it to use $wpdb
- Changing root password in PHPMyAdmin for WordPress Database when going live
- creating new field on mysql
- Remove empty rows from the database
- Custom WordPress Table wpdb
- how to encyrpt DB_PASSWORD in wp-config
- How can I detect right db type?
- Delete all posts that do NOT have a specific tag
- Changing order of db results when encoding to JSON
- Second ezSQL initialization for MSSQL
- Fetch a single row from a custom table for to a given ID
- Database create or redirect
- How to escape percentage sign(%) in sql query with $wpdb->prepare?
- Link multiple user databases together?
- Sql query to get all metadata for a post
- Recovery – Restore Database after moving folder location locally
- Performing CRUD operations on front end in wordpress
- Set a cron job to delete a specific database table table every midnight
- Job and Employee Performance Tracking with Product Safety
- SQL database import #1046 error
- How to import products in host instead of database on wordpress?
- I would like some help wth an SQL query to link posts with categories
- Where is the HTML-handler part in the wpdb class?
- Is there a way for two deferent themes to consume two different DB on a same WP instance?
- Search and Replace in Windows XAMPP site
- The function is deprecated; use mysql_real_escape_string() instead
- How can i syn wordpress user table with a stand-alone php script?
- insert data from a form:: Warning Empty query mysqli::query()
- How can I get $wpdb to show MySQL warnings?
- How to get specific table by current user login
- $wpdb not working
- WordPress Database Posts Table query
- Hang Up Followed By Can’t select database
- How to extract some part of WordPress full source code
- Mysql Queries per Visit – Crazy High
- using same mysql user with many databases
- Why are my WordPress post queries so slow?
- Custom wordpress SQL statement for a website
- How to find fresh (last modified) and sql backup?