I have tried to make a theme, pre-packed from underscore.me, then I have gone the theme root folder. Then command: composer install then I have found 1 folder (vendor) and composer.lock file. Then I can check my project with composer lint:wpcs this command. Now, feel that this vendor & composer.lock file is unnecessary for me.
How can I uninstall them with command line without sudo rm -rf 'bla bla' this command.
Thank you
Related
I use git-ftp and bitbucket pipelines for my Wordpress project CI/CD. I make the wp-content git repo. I use Webpack to bundle the files and I also add dist folder to gitignore. Here is my setup:
wp-content/bitbucket-pipelines:
image: node:12.13.1
pipelines:
branches:
develop:
- step:
name: Deploy to staging
deployment: staging
script:
- cd themes/my-theme
- npm install
- npm run build
- apt-get update
- apt-get -qq install git-ftp
- git ftp push --syncroot themes/my-theme/ --user $FTP_username --passwd $FTP_password $HOST/wp-content/themes/my-theme/
The pipeline works just fine. However, it does not upload the dist folder to the host. I think that's because I add dist to my gitignore. How can I add the .git-ftp-include. Should I create the file and upload it to the host (under my-theme) or should I add it to my local and upload it to bitbucket
.git-ftp-include
themes/my-theme/dist/
.gitignore (under wp-content)
# ignore specific themes
themes/twenty*/
themes/my-theme/css/style.css
uploads
plugins
languages
cache
ai1wm-backups
dist
node_modules/
.idea/
.DS_Store
.log
After setting up WordPress site on OpenShift, I tried to upload new plugin from my local repo, according this manual, but nothing was uploaded to OpenShift.
Step I've done:
# cloning WordPress app from OpenShift
rhc git-clone -a wpdev
# Going to plugins folder on local machine
cd ~/openshift/wpdev/.openshift/plugins
# cloning my plugin from GitHub to openshift plugins folder
git clone https://github.com/samuelsh/youtube-channel-player.git
# standart add/commit/push
git add plugins
git commit -m "youtube-channel-player deploy to openshift"
git push
After checking my wpdev app on openshift, looks like my plugin isn't uploaded.
What could go wrong here?
Thanks
Well, appeared it was git submodule issues.
Trying explicitly add new files to repo resulted following error:
git add .openshift/plugins/youtube-channel-player/*
fatal: Pathspec '.openshift/plugins/youtube-channel-player/admin' is in submodule '.openshift/plugins/youtube-channel-player'
Removing the directory from git and adding it again worked for me:
git rm --cached directory
git add directory
I am attempting to install Drupal 7.34 on RHEL and I continue to run into issues with permissions on sites/default/files. I've searched all over for a solution, but nothing has helped.
Here are the steps I am taking (with root access):
In /var/www/html I execute: drush dl drupal to download Drupal.
I then follow Drupal's install instructions (from /var/www/html):
mv drupal-7.34/* ./
mv drupal-7.34/.htaccess ./
mv drupal-7.34/.gitignore ./
cp sites/default/default.settings.php sites/default/settings.php
chmod a+w sites/default/settings.php
chmod a+w sites/default
cd ..
chown -R apache:apache html
In the browser, I navigate to http://myhost/install.php. In the "Verify requirements" step of the install process I receive the following error:
The directory sites/default/files does not exist.
So, I take then take the following steps:
mkdir html/sites/default/files
chmod a+w html/sites/default/files
chown apache:apache html/sites/default/files
When I attempt the install process I now get the following error:
The directory sites/default/files is not writable.
What am I missing here? The sites/default/files directory exists and is writable. Any guidance is much appreciated.
The solution I applied was more of a work-around, but I ended up using Drush to handle the entire installation rather than using it to download Drupal and manually configuring it from there.
I still don't know the answer to this "simple" error but I do know that before adding users or granting full permissions to a group one must know the name of the user running (owning) httpd. This is not always www-data
Also - my sites/default/files -is- in fact writable as is the case for just about everyone who posts this question. There is something seriously wrong with Drupal's install that it has this issue, that it is so prevalent and not addressed adequately by the code maintainers. Searched about twenty responses to this "very simple" problem and still none of the suggestions work. Opened up permissions entirely, chown the drupal installation files to the httpd daemon (apache) and group (www in my case)
These fixed it for me:
chmod 777 sites/default
chmod 777 sites/default/setting.php
It turns out the 'chmod a+w...' commands in the docs were not enough - the 777 includes 'x', making the items executable as well as writable.
I am wordpress developer and want to use git in wordpress. I also want version control in my wordpress so that everything in the projects gets updated frequently.and also how to install wordpress as git submodule?
thanks,
suku
Just add wordpress as a submodule from the root directory of your project like this:
git submodule add git://github.com/WordPress/WordPress.git ./your/submodule/directory
Make sure that the directory doesn't exists before executing the above command.
I like to keep my root project directory nice and clean, and I use Wordpress Skeleton in a directory called "app," while Wordpress sits in a directory called "wp," therefore I execute the command below from the root project directory.
git submodule add git://github.com/WordPress/WordPress.git ./app/wp/
This makes it really easy to update wordpress and keep everything under version control. To update to 3.8.1 do the following:
cd wp
git fetch && git fetch --tags
git checkout 3.8.1
cd ./
git add wp
git commit -m “Updated to WP 3.8.1”
git push
I wrote an unfinished article about it over here: http://www.kj-prince.com/wordpress-development-deployment/
Hope this helps.
I have an already started Symfony2 project. I need to install a new bundle, and as I saw i need to add a new line to my composer.json and then execute the update command.
The thing is, my composer.phar file and the .json are on different folders.
/httpdocs/composer.json
/bin/composer.phar
So after I add this line to the .json file:
"doctrine/mongodb-odm-bundle": "3.0.*#dev"
If then i try /bin/php composer.phar update doctrine/mongodb-odm-bundle i got an error saying that the composer.json is not there and is correct of course. So my doubt is WHY thoose files are in different folders? does the previous developer make a mistake? Should I move the files to a same folder? To bin or httpdocs?
It doesn't matter where the composer.phar lives. The relevant part, that your current working directory is in the symfony project (where the composer.json lives). Then simple execute composer (if the execute bit is set, no call to php is required).
/bin/composer.phar update doctrine/mongodb-odm-bundle
You can have a global composer.phar and use only this one. This is how you would normally have it on a development machine where you have multiple composer projects.
Some people tend to put a composer.phar into their projects so they can deploy it together with their application.
Solution to composer complaining about the missing composer.json:
you have to change your working directory to the path where the composer.json you want to use is located. ( every composer project has it's own composer.json )
This means cd into your project directory ...
cd /path/to/yourproject
... Before executing
/bin/composer.phar update ...
Alternative:
You can specify a working directory for composer with the --working-dir option.
This way you point composer to your project from any current working directory ( even if you project's path differs from where your cwd is ) . example usage:
composer --working-dir=/path/to/yourproject <command>
Tip #1
rename /bin/composer.phar to /bin/composer
mv /bin/composer.phar /bin/composer
chmod +x /bin/composer
Then you can simply ( assuming /bin is in your PATH ) ...
composer <command>
Tip #2
You can check where you currently are with pwd ( *p*rint *w*orking *d*irectory )
pwd