If you don’t have WPCLI installed, but still have commandline access or access via PHPMyAdmin, run:
UPDATE wp_posts SET post_content = REPLACE(post_content,'<old URL>','<new URL>');
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value,'<old URL>','<new URL>');
Related Posts:
- Setting up foreign keys in phpMyAdmin?
- #1045 – Access denied for user ‘root’@’localhost’ (using password: YES)
- MySQL Error #1133 – Can’t find any matching row in the user table
- phpmyadmin #1045 Cannot log in to the MySQL server. after installing mysql command line client
- How to create a foreign key in phpmyadmin
- importing a CSV into phpmyadmin
- MySQL said: Documentation #1045 – Access denied for user ‘root’@’localhost’ (using password: NO)
- What specific database privileges does WordPress need?
- “#1067 – Invalid default value for ‘post_date'” when trying to reset AI after backup
- How to copy post titles to post slug in phpmyadmin
- How to do a MySQL dump from production site without using a search and replace script for local development?
- How to Create a Admin User for A WordPress Site via MySQL (PHPMyAdmin)?
- SQL error #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’ [closed]
- Set meta_key and meta_value for all registered user in wordpress using sql query [closed]
- Can’t find my wordpress DB in phpmyadmin
- Backing up and restoring multiple sites efficiently
- $wpdb to insert html form information
- Setting up WordPress Locally on WAMP for a new site (with one already)
- Getting Error Trying to Create Table
- Export Yoast Keywords from MySQL/phpMyAdmin
- Editing mysql tables/database with wordpress or other app/cms
- List users with the most posts in the last 30 days
- Export SQL query based on custom field?
- Mysql Server keeps crashing
- How to bulk delete a certain part of all wordpress posts
- When I add metadata, metavalue length is added in to the value in some cases
- WordPress fails to install with “Can’t Select Database” Error (WAMPServer)
- Find locations of all featured images of draft posts via SQL
- SQL query to change custom field in WordPress database
- An SQL query to find orphaned image attachments and their meta
- cannot log in to the mysql server (wamp and wordpress)
- SQL command to export post_content from wp_posts using phpMyAdmin
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- Access Denied for User ‘root’@’localhost’ (using password: YES) – No Privileges?
- MySQL Error “Operand should contain 1 column”
- How to use MySQL DECIMAL?
- MySQL ERROR 1290 (HY000) –secure-file-priv option
- MySQL server startup error ‘The server quit without updating PID file’
- Duplicating a MySQL table, indices, and data
- mysql Foreign key constraint is incorrectly formed error
- SELECT * FROM multiple tables. MySQL
- mysql: SOURCE error 2?
- How to avoid MySQL ‘Deadlock found when trying to get lock; try restarting transaction’
- MySQL foreach loop
- MySQL IF NOT NULL, then display 1, else display 0
- MySQL Calculate Percentage
- Repair all tables in one go
- Get the new record primary key ID from MySQL insert query?
- How to change collation of database, table, column?
- Failed building wheel for mysql-python
- ERROR 1115 (42000): Unknown character set: ‘utf8mb4’
- Error Code: 1290. The MySQL server is running with the –secure-file-priv option so it cannot execute this statement
- Remove Primary Key in MySQL
- How to get the max of two values in MySQL?
- mysql: connection refused when trying to connect to localhost using remote IP
- Error: Duplicate entry ‘0’ for key ‘PRIMARY’
- Why are simple updates to wp_postmeta’s “_edit_lock” so slow?
- Complex meta query with 3 keys
- How to log mysql errors from wordpress core?
- Gaining Login Access via the Database
- wpdb Custom Meta Data with 2 conditions
- query to create woocommerce products from images
- Configure WordPress to connect to Mysql DB using SSH tunneling
- Set Display Name to first and last name (phpmyadmin SQL Query)
- Rewrite database urls
- Migrating from Existing MySQL Setup to WordPress
- How to split the a table in database?
- How do I join a $wpdb query with user meta using default value if not exist?
- mySQL statment count of post in each category and sub category
- Paypal Post IPN handeling nightmare
- Is there a page length limit?
- WordPress tables and aliases?
- What’s the sql for this condition?
- Create a form with custom autocomplete address field and CSV import values
- WordPress insert query is not working : Showing no Error
- Copy usermeta value where ID matches in the same table
- Some Post Content Does Not Show Up In DB Search
- How can I write a formal sql query to get data from a custom table
- How can I view my site directly from WordPress dashboard?
- (WP List Table) How to sort by SKU and Custom Fields?
- Word Press and database from another server sync
- User set date and time from frontend doesn’t get stored into database
- get posts whether meta_key exists or not
- How to run SQL query from WordPress ‘WP Crontrol’ plugin
- I wanted to Know that how can I give ingore to 0000-00-00 in my config file
- Changes not being reflected on new server
- update_option returns false in AJAX, how to debug?
- Why can’t i come back to older working version of php after ugrade with error log on php 7.2 and 7.3
- WordPress database error Duplicate entry for key ‘slug’
- MySQL – How to combine data from two tables into one?
- Check if a database is well installed
- Stop my loop to register data twice
- `#1215 – Cannot add foreign key constraint
- How to restore: Database intact but folders deleted
- wp_postmeta – lot of meta fields
- XML RPC post produces immediate revision with odd post_date_gmt
- Woocommerce: Grab total revenue of a product over all orders
- SQL Database Lost
- InnoDB: Error: log file ./ib_logfile0 is of different size
- Postgres equivalent to MySQL’s \G?