According to this post and with local installation of Drush 9 as adviced by the official website (not globally installed), I put my Drush8 alias file into: ~/.drush/sites, in addition of the ~/www/domain/sited8/drush/sites default folder. And I edited the ~/.drush/drush.yml file to add my other path to alias files.
Then I run ~ $ drush site:alias-convert and get:
Absolute path to a directory for writing new alias files [~/www/domain/sited8/drush/sites]: !!
Then drupal ccreate converted files into this folder. It seem to ignore my other folder..
Actually I get only one website but I will add others, so I want to have my alias files into a root folder instead of a drupal website folder (it will not be a multisite install).
So why drush doesn't look an dwork into my ~/.drush/sites folder ?
EDIT: after convertion, I move files to ~/.drush/sites then with drush sa I get a list like :
'#sited8ce.prod':
root: ~/www/celony/sited8
uri: 'https://www.lycee-celony.com/'
'#sited8mg.dev':
root: ~/www/mgasquet/sited8
uri: 'http://d8-lycee-marie-gasquet.eu'
but when I try to use one of them I get partial status info:
$ drush #sited8ce.prod status
PHP binary : /php/7.2.14/bin/php
PHP config : ~/admin/config/php/php.ini
PHP OS : Linux
Drush script : ~/www/mgasquet/sited8/vendor/drush/drush/drush
Drush version : 9.7.1
Drush temp : /tmp
Drush configs : ~/.drush/drush.yml
~/www/mgasquet/sited8/vendor/drush/drush/drush.yml
Drush is locally installed in both websites but the drush folder is only present on one..I don't understand the logic here..
Because alias doesn't work:
~ $ drush #sited8ce.prod pml | grep goo
Command pml was not found. Pass --root or a #siteAlias in order to run Drupal-specific commands.
Related
I am setting up my first VIP theme on Ubuntu 14.04 LTS computer by following instructions at:
https://vip.wordpress.com/documentation/vip/dev-environment/ and
http://docs.chassis.io/en/latest/quickstart/#prerequisites
At this point I have:
- Virtual Box 5.1 installed
- Vagrant 1:1.9.4 installed
Before writing the steps in detail here is my current folder structure
/var/www/html
|-> thevp (Chassis installation)
|-> wp
|-> wp-content/themes/vip/plugins
| | |-> vip-init.php
| |-> vp-theme (custom theme)
|-> mu-plugins
Vagrant URL: vagrant.local
Admin URL: vagrant.local/wp/wp-admin
After installing above two I installed Chassis inside /var/www/html/thevp folder. This installed a folder called wp, which I believe the default WordPress installation. So now I have /var/www/html/thevp/wp (plus other folders and files).
The wp-content folder sits inside "wp" folder.
Next I installed VIP Plugins and Helpers from svn co https://vip-svn.wordpress.com/plugins/ wp-content/themes/vip/plugins inside /var/www/html/thevp/wp/wp-content/themes/vip/plugins.
Then I installed VIP mu-Plugins inside /var/www/html/thevp/wp/wp-content/mu-plugins
And finally, I cloned my VIP theme from Github inside /var/www/html/thevp/wp/wp-content/themes/vp-theme
After all installations and cloning I ran $vagrant up from within /var/www/html/thevp/, which provisioned my Chassis Box and presented with the URL http://vagrant.local/.
The above URL runs fine and opens default site with TwentySeventeen theme.
Under Admin > Themes I can see my own theme vp-theme present along with other default themes WordPress has installed.
But whenever I am trying to Activate this theme I am getting this error message:
Warning:
require_once(/vagrant/content/themes/vip/plugins/vip-init.php): failed
to open stream: No such file or directory in
/vagrant/wp/wp-content/themes/vip/yrc-wordpress-theme/functions.php on
line 9
Fatal error: require_once(): Failed opening required
'/vagrant/content/themes/vip/plugins/vip-init.php'
(include_path='.:/usr/share/php') in
/vagrant/wp/wp-content/themes/vip/yrc-wordpress-theme/functions.php on
line 9
Assuming that /var/www/htm/thevp is not being recognized as the correct path becausd wp-content folder actually resides under /var/www/html/thevp/wp and this should be root, I destroyed running instance of VirtualBox and ran $ vagrant up again but this time from inside /var/www/html/thevp/wp.
But I still get the same error. Cannot figure out how to resolve this problem.
This is my first time with VIP theme. Please help!
UPDATE:
I checked my theme's functions.php for the following line
require_once WP_CONTENT_DIR . '/themes/vip/plugins/vip-init.php';
which is there, but I have a feeling that WP_CONTENT_DIR is probably outputting wrong path for some reason as the error message says
require_once(/vagrant/content/themes/vip/plugins/vip-init.php)...
I don't find any folder /vagrant/content. Got completely stuck here as I have no idea what to do next!
After long research and googling I finally got this to work.
The main reason for the error to come up was the content folder defined in config.yaml file.
When Chassis installs, it creates a file called config.yaml in its root. This is the default settings in the file under "path" section.
# Base directory for reference. Relative to the Chassis directory.
base: .
# Where WordPress lives. Relative to the base directory.
wp: wp
# Content directory. Relative to the base directory.
content: content
First thing I did was changed content: content to content: wp/wp-content. Thing to notice here is Chassis creates the default WordPress installation under "wp" not under "Wordpress".
Second thing I needed to change was from multisite: No to multisite: Yes in the same file.
However, while booting Virtual machine I encountered the following error:
It appears your machine doesn't support NFS, or there is not an
adapter to enable NFS on this machine for Vagrant
That got fixed by installing NFS Common and NFS Kernel Server
$ sudo apt-get install nfs-common nfs-kernel-server
I encountered another error during VitualBox booting with vagrant. It asked me for my sudo password. But after supplying it the execution failed and I received the following message on console:
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o 'vers=3,udp' 33.33.33.1:'/home/subrata/' /var/www
Stdout from the command: Stderr from the command: stdin: is not a tty
mount.nfs: requested NFS version or transport protocol is not
supported
To fix that I had to add the following lines in /etc/sudoers file.
vagrant ALL=(ALL) NOPASSWD:ALL
Defaults:vagrant !requiretty
Finally I am all set! $vagrant up has successfully booted my VM.
http://vagrant.local runs fine as well as now I am able to activate my own VIP theme for the first time :)
I reproduced demo NewsPlus Lite on my site http://druid888.mcdir.ru,but when I update Drupal core and run the update.php script I get the error:
Configuration directory: sync
The directory sites/default/files/config_2ds9Pl...-wAgFK.../sync does not exist."
Simply add an sync folder in an appropriate place on your filesystem, and add this line to your settings.php (or settings.local.php), e.g.:
$config_directories['sync'] = __DIR__ . '/sync';
Drupal will create appropriate directories during installation in your sites/default or sites/<sitename> folder.
Source: If you have just changed code at Drupal.org
This one is driving me crazy.
Whenever i use "drush dl" to download site_audit or drupalgeddon it downloads these modules inside the drush home folder ( /users/[user]/.drush ) instead of the current sites modules folder.
the "drush status" and the "drush #site-alias status" command gives me the correct site information, see below:
C:\wamp\www\drupal>drush dl site_audit
Install location C:\Users\Thomas/.drush/site_audit already exists. Do you want
to overwrite it? (y/n): n
Skip installation of site_audit to [warning]
C:\wamp\www>drush #drupal status
Drupal version : 7.34
Site URI : localhost/drupal
Database driver : mysql
Database username : root
Database name : drupal
Default theme : garland
Administration theme : garland
PHP executable : php.exe
PHP configuration : C:\Users\Thomas.drush\php.ini
PHP OS : WINNT
Drush version : 6.0
Drush configuration :
Drush alias files : C:\Users\Thomas/.drush/aliases.drushrc.php
Drupal root : /mamp/htdocs/drupal
Site path : sites/default
File directory path : sites/default/files
Also, when i try to download a module that already exist in the current sites modules folder it tells me so correctly. Same goes for the "en" command. I can also disable or uninstall modules successfully. Uninstalling does not remove the folder, tough.
The only thing i have noticed is that "drush configuration" does not show a path. However, i did copy the example file inside the .drush home folder AND one inside the sites/all/drush folder (i removed the 'example' from the filename off course).
Running windows 8 and tried both MAMP and WAMP with same results. I really hope someone can help me with this cause i am pulling my hair here.
Update:
I tested the dl command with other modules and they are downloaded to the correct folder. I cleared the drush cache several times. Yet site_audit and drupalgeddon keep getting downloaded to the wrong folder. I just don't get it.
Stupid me. These are both not modules but Drush extensions, hence the alternative download locations.
I think the real problem is, that you didn't specify the site-alias in your "drush dl" statement.
You run
drush #site-alias status
containing the site-alias, but
drush dl site_audit
without a sie-alias. I suppose you are in the drush folder, as drush downloads to the current folder, if no root folder is given explicitly or via site-alias.
I am trying to install composer on windows (symfony 2 project). The problem is that I always get some strage errors - that a couple of files are not in the allowed path.
I've tried a couple of methods to install compsoer:
Downloading raw composer.phar file, throwing it into the symfony2 root folder and running composer installation command. It gives me an error that usr/.../composer/.htaccess is not within the allowed path
php -r "path" gives similar results as above, but with more "not in the allowed path" errors
Windows installer - it throws an error that the installer couldn't execute php.exe file, no idea why.
What's wrong?
Adjust open_basedir in your php.ini to include the path to your project and the other paths that composer tries to load from/write to. The variable accepts multiple paths separated by : (unix) or ; (windows).
open_basedir = "/home/sites/yoursites/:/tmp/:/"
... or remove the restriction completely from php.ini.
; remove open_basedir completely ...
; <nothing here>
; ... comment it out like this ...
; open_basedir = "..."
; ... or set it to an empty value like this ...
open_basedir =
You can find the location of the correct php.ini for the CLI sapi with:
php --ini
First, you should make sure that the path of php.exe is in your ENV (Environment variable);
Second, if composer's windows installer can't install, just try to use "Run With Administrator Permission", and if it also does not work, just comment me your error.
I have installed elasticsearch with brew install elasticsearch. My plugins seem to reside in /usr/local/Cellar/elasticsearch/0.19.8/plugins. With cat $( which plugin ) I see a ES_HOME variable that contains the correct path.
Is there a way to ask elastic for ES_HOME or the plugins directory?
EDIT
What I am looking for is the directory used by the plugin executable to install the plugins when I do plugin -install something. I want to use that path in a script to fire up elastic search.
To find your elasticsearch home directory & install plugin(s) follow these steps below.
Locate your home directory ( Look for Settings -> Path -> Home for value )
$ curl "localhost:9200/_nodes/settings?pretty=true"
Goto Location (Example settings.path.home value: /usr/local/Cellar/elasticsearch/1.5.0)
$ cd /usr/local/Cellar/elasticsearch/1.5.0
Install Plugin (Example plugin: mobz/elasticsearch-head)
$ bin/plugin -install mobz/elasticsearch-head
I used this command:
$ curl "localhost:9200/_nodes?pretty=true&settings=true"
Check next setting: nodes - settings - path - plugins and use it as your plugins directory.
I had the same problem as you and I was able to locate the ES_HOME directory by following
#imotiv's suggestion.
Simply call PATH_TO_SERVER:9200/_cluster/nodes?settings=true&pretty=true
Therein you'll see the path.home entry. That is your ES working directory.
Once you locate your ElasticSearch home folder, in my case /usr/share/elasticsearch, cd down to that location.
Once there, you could simply run bin/plugin -install elasticsearch/elasticsearch-analysis-phonetic/1.3.0 and it will automatically do the rest for you.
Hope this helps.
Not totally sure what you are trying to achieve, but hopefully this will help. There are a couple of way to find the plugins directory for elasticsearch. You can set plugins: TRACE in the logging.yml file, it will cause elasticsearch to log the full path of plugins that it's loading. You can also execute
$ curl "localhost:9200/_cluster/nodes?settings=true&pretty=true"
to check the current settings. Elasticsearch is using location specified in the path.plugins settings to load plugins. If path.plugins is not set, it will use plugins directory in the directory specified by the path.home setting.