Title: WP-Cli
Last modified: November 8, 2017

---

# WP-Cli

 *  Resolved [baldursson](https://wordpress.org/support/users/baldursson/)
 * (@baldursson)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/wp-cli-5/)
 * Hi,
 * This issue is not really your fault, but I was wondering if you maybe know how
   to solve it. I have a site where the WordPress core and wp-contents are separated
   into their own folders to enable installaton with Composer.
    I’m trying to get
   the cli command working, but with no luck. Just getting `Error: 'ai1wm' is not
   a registered wp command`. However, it works fine on sites with a traditional 
   setup. Is there anything I have to require in the wp statement?
    -  This topic was modified 8 years, 7 months ago by [baldursson](https://wordpress.org/support/users/baldursson/).

Viewing 1 replies (of 1 total)

 *  Thread Starter [baldursson](https://wordpress.org/support/users/baldursson/)
 * (@baldursson)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/wp-cli-5/#post-9662860)
 * Ok, I finally cracked it myself. I was using `$_SERVER['DOCUMENT_ROOT']` in `
   wp-config.php` to set path to wp-content. That apparently doesn’t work so good
   with wp-cli, so I just replaced it with `dirname(__FILE__)`

Viewing 1 replies (of 1 total)

The topic ‘WP-Cli’ is closed to new replies.

 * ![](https://ps.w.org/all-in-one-wp-migration/assets/icon-256x256.png?rev=2458334)
 * [All-in-One WP Migration and Backup](https://wordpress.org/plugins/all-in-one-wp-migration/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/all-in-one-wp-migration/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-wp-migration/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-wp-migration/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-wp-migration/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-wp-migration/reviews/)

## Tags

 * [wp-cli](https://wordpress.org/support/topic-tag/wp-cli/)

 * 1 reply
 * 1 participant
 * Last reply from: [baldursson](https://wordpress.org/support/users/baldursson/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/wp-cli-5/#post-9662860)
 * Status: resolved