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
- Deleting WordPress posts and media files based on author via MYSQL database
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- Case statement in MySQL
- how to drop partition without dropping data in MySQL?
- Creating a search form in PHP to search a database?
- 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
- WordPress (MyISAM) database is slow, should I switch to InnoDB?
- WordPress Database lost auto increment
- wpdb->insert multiple record at once
- Slow wp_term_relationships query
- How to use “TRUNCATE TABLE” MySQL statement?
- Organizing WP Pages based on old website database
- 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
- Would manually deleting the dumping data fix a “#1062 – Duplicate entry ‘1’ for key ‘PRIMARY'” phpMyAdmin error?
- WooCommerce – Query for ordered products
- wpdb query on custom table not working [closed]
- Tons of Twitter rows in my database
- Set Display Name to first and last name (phpmyadmin SQL Query)
- 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?
- Select Multiple meta_value from WP DB; Single Query
- Is it possible to split database tables using HyperDB?
- What happens if I overwrite the current wp_options table with a backup from a week ago?
- WordPress database error – Error in SQL syntax – I can’t identify any error?
- CRUD operations using WordPress database API
- Database Tables Lost Indexes? How to Recover?
- How to Mirror WordPress database from Remote server to Local server
- WordPress is not creating table in database after activating plugin,
- Is MariaDB’s Aria storage engine suitable for WordPress?
- Difficulty importing my live site to local
- Slow queries constantly getting stuck on WordPress database of ~100,000 posts
- How do I query wp_options for expired transient pairs with MySQL commands?
- WordPress running SQL query to update database from form
- Migrating from PDO using SQLite to clean new install using MySQL
- 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
- Changing root password in PHPMyAdmin for WordPress Database when going live
- How to properly check if a table exists in WordPress Database using Show Tables Query
- Can’t update WordFence Options, clear data manually
- Is it possible to have more than 1 MySQL database in my WordPress blog?
- How and where is wordpress adding mySQL content to database?
- Using AND and bracket grouping in SQL not working
- Is my way to change WordPress server is correct?
- Delete/Replace words from X to Y in post content
- How to delete a particular row in a database table
- How to create more than one new wpdb object?
- Files on Localhost, Database on Server
- Remote database -> massive response time increase?
- Getting value from database table depending on field value
- Getting “Error Establishing a Database Connection” on localhost in new Mac OSX Lion environment
- custom tables in wordpress Database? (can i just create them with sql?)
- Accidently changed the GUID
- Replacing javascript link in WordPress database without getting mysql syntax errors
- How to edit custom table data in frontend
- local wordpress broke after changing URL
- how to access 2nd Mysqli Database from different server for wordpress
- Error establishing a database connection – WordPress setup, everything else is working
- Help posting values to DB on submit using $wpdb->query
- How to map data on CSV to web pages?
- 2 $wpdb queries causing error Table ‘wp_postmeta’ is specified twice, both as a target for ‘UPDATE’
- WPCLI search and replace in a particlar site dir effect another site-dir
- $wpdb not working
- Hang Up Followed By Can’t select database
- WordPress character set issue
- Link wordpress with a SQl + MongoDB + .NET
- Why is converting my database to UTF-8 truncating entries?
- SQL query to rewrite all media URLs to end with .webp
- SQL errors when querying for something with apostrophes
- Naming conventions for database tables