# Question about wp-cli command

**URL:** <https://community.kinsta.com/t/question-about-wp-cli-command/1886>\
**Category:** Application Support\
**Created:** [November 18, 2022, 3:00am UTC](https://community.kinsta.com/t/question-about-wp-cli-command/1886 "2022-11-18T03:00:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gonzo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/gonzo/32/1645_2.png) [@gonzo](https://community.kinsta.com/u/gonzo)\
**Post date:** [November 18, 2022, 3:00am UTC](https://community.kinsta.com/t/question-about-wp-cli-command/1886/1 "2022-11-18T03:00:04Z")

</div>

Hi,

What would happen if I excute the following command?

$ wp search-replace [my-remote.com](http://my-remote.com) my-local-site.local --allow-root

Just replace all the remote site’s URL with the .local one?

I’m currently trying to customize my WP site on local with WP-CLI, but also looking for a way to customize my site on local like Local by flywheel.

Whenever I click “Open WP Admin”, I’m redirected to the remote URL.  
Can’t I even add/delete plugins on local dashboard like Local by flywheel?

Thank you

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/kevin/32/808_2.png) [@Kevin](https://community.kinsta.com/u/Kevin)\
**Post date:** [November 18, 2022, 5:14pm UTC](https://community.kinsta.com/t/question-about-wp-cli-command/1886/2 "2022-11-18T17:14:31Z")

</div>

Hi @gonzo, thanks for reaching out. The [wp-search](https://developer.wordpress.org/cli/commands/search-replace/) command runs on entries within the database.

If you pulled your site from Kinsta, this step should have already run for you. Please check your wp-config.php file to see if there are any entries that may be redirecting you to the remote site. If not, you can force the home/site url within wp-config.php without running a search and replace. That usually at least allows you to log in: [Changing The Site URL – WordPress.org Forums](https://wordpress.org/support/article/changing-the-site-url/#edit-wp-config-php)

---

<div class="post-metadata">

**Author:** ![gonzo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/gonzo/32/1645_2.png) [@gonzo](https://community.kinsta.com/u/gonzo)\
**Post date:** [November 23, 2022, 11:58pm UTC](https://community.kinsta.com/t/question-about-wp-cli-command/1886/3 "2022-11-23T23:58:32Z")

</div>

> [@Kevin](#):
>
> If you pulled your site from Kinsta, this step should have already run for you.

It looks admin dashboard URL has not been replaced with the local’s on my end.

> If not, you can force the home/site url within wp-config.php without running a search and replace. That usually at least allows you to log in: [Changing The Site URL – WordPress.org Forums](https://wordpress.org/support/article/changing-the-site-url/#edit-wp-config-php)

That worked. Appreciate that!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/8/80f8c4e56fecc02327a0964e6bf63a716483529f.png) [@system](https://community.kinsta.com/u/system)\
**Post date:** [November 29, 2022, 4:07pm UTC](https://community.kinsta.com/t/question-about-wp-cli-command/1886/4 "2022-11-29T16:07:47Z")

</div>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
