You move your WordPress site from oldsite.com to newsite.com. What must you do to ensure all URLs work correctly?
Think about where WordPress stores the site address and how it builds links.
WordPress stores the site URL and home URL in the database. When migrating, these must be updated to the new domain so links and media URLs work correctly.
You export your WordPress database from the old environment and import it into the new one. You do not update serialized data containing old URLs. What will happen?
Serialized data stores string lengths. What happens if the string changes but length does not?
Serialized data includes string lengths. If URLs change but lengths are not updated, WordPress cannot read the data correctly, causing broken links or settings.
After migrating your WordPress site to a new server, the site shows a blank white page. Which option is the most likely cause?
Check error logs or enable debugging to find PHP errors.
A blank page usually means a PHP fatal error or memory exhaustion. Checking error logs or enabling WP_DEBUG helps find the issue.
You migrate your WordPress site to a new server with a different database name, user, and password. Which wp-config.php snippet correctly updates the database connection?
Remember how constants are defined in PHP.
In wp-config.php, database credentials are set using the PHP define() function with string values in quotes.
Given this PHP snippet run after migrating a WordPress site, what will get_option('siteurl') return?
<?php update_option('siteurl', 'https://newdomain.com'); update_option('home', 'https://newdomain.com'); $siteurl = get_option('siteurl'); echo $siteurl; ?>
What does update_option do to the stored value?
update_option changes the stored value in the database. get_option then returns the updated value.