I think hardest when I'm making something (making = the rendering of experience via decision/interpretation/repetition). I (re)designed this blog because I want to make notes about the things I see, read, hear, plan, do. An open diary, an aide-memoire.

Find and Replace SQL for Uploading a Local Wordpress Site


I’m always forgetting processes like this, which are occasional for me. So this is a note of the SQL query I use to get local wordpress site up and running online:

After uploading updated theme files, and importing the local MySQL database to the online site, run this query in the SQL tab of PhpMyAdmin to quickly replace all the copies of the local url with the new online ones.

update `wp_options` set `option_value` = replace(`option_value`, “http://localhost:8888/mysite”, “http://www.mysite.co.uk/wp”);

That’s it! If other references to your localhost exist (eg. as image addresses in your posts, you can run other queries to deal with them, just swap `wp_options` and `option_value` with the relevant table_name and field_name respectively.


Books:
Films:
No films yet...
Recent Posts: