Posts

Showing posts from March, 2019

Reset wordpress admin password

Image
To reset wordpress admin username or password login to mysql either through command line or phpmyadmin

wordpress database username and password

Image
To find wordpress database username and password you need to go WordPress folder open the file using command vi wp-config.php

mysql error : ERROR 1018 (HY000): Can't read dir of '.' (errno: 13)

You need to set ownership and permissions for directory: chown -R mysql:mysql /var/lib/mysql/  #your mysql user may have different name chmod -R 755 /var/lib/mysql/ Note: -R makes commands recursive - you may omit it, if there is no subdirs in /var/lib/mysql/.

Nginx commands

Image
Check whether Nginx is running or not sudo netstat -plunt you can clearly see nginx is in listening mode at port 80 if nginx  not running use below commands: service nginx start or systemctl nginx start Now to check the nginx is running as which user

Install virtualmin on freshly insatlled centos 7 server

Image
https://www.virtualmin.com/download.html 1. Log in to the server through SSH use screen command to go to the screen and then proceed for a cloud server as you may get Broken pipe error if the connection drops or idle for a long time. simply type screen if you get an error like command not found simply install screen by yum install screen(centos or RPM based) sudo apt-get install screen(Ubuntu or Debian based) 2.  Use the below command to download script wget http://software.virtualmin.com/gpl/scripts/install.sh 3. Give the script executable permission by using the command below: chmod u=wrx install.sh 4. Then use this command to excute the script ./install.sh 

Root password for newly created Instances in cloud computing

Image
When you create new instances and if you do not get the password for that instance to login you can simply reset the password for the root account                                           Restart the instance after resetting the password

How to Move Copy Delete Files Using Linux Commands.

mv project-community-edition/* /home/bum/public_html All files and folder(except hidden files that starts with . like .htaccess) from project-community-edition will move to public_html directory Should you want to move a file into the parent directory of the current working directory, there's an easy way to do that. Say you have the file testfile located in ~/Downloads and you want it in your home directory. If you are currently in the ~/Downloads directory, you can move it up one folder (to ~/) like so: mv testfile ../   The “../” means to move the folder up one level. If you're buried deeper, say ~/Downloads/today/, you can still easily move that file with: mv testfile ../../

magento/product-community-edition 2.2.3 requires ext-intl

Error: Installation request for magento/product-community-edition 2.2.3 -> satisfiable by magento/product-community-edition[2.2.3].     - magento/product-community-edition 2.2.3 requires ext-intl * -> the requested PHP extension intl is missing from your system. cause: not able to find an extension intl as you can see in the error message ext stands for extension Solution: we need to install intl extension to do that simply use below command yum install php-intl (cent os) apt install php-intl (ubuntu)

Why Nginx requires php fpm

Unlike Apache, Nginx doesn’t have built-in support for processing PHP files so we need to install a separate application such as PHP FPM which will handle the PHP files.

-bash: /usr/bin/php: No such file or directory

Image
Error:  -bash: /usr/bin/php: No such file or directory cause: no PHP installed on the system solution: install PHP using command: yum install php To check php -v

Error: Package: php-mcrypt-7.1.27-1.el7.remi.x86_64 (remi-php71)

Error: Package: php-mcrypt-7.1.27-1.el7.remi.x86_64 (remi-php71)            Requires: php-common(x86-64) = 7.1.27-1.el7.remi            Installed: php-common-7.2.16-1.el7.remi.x86_64 (@remi-php72)                php-common(x86-64) = 7.2.16-1.el7.remi            Available: php-common-5.4.16-46.el7.x86_64 (base)                php-common(x86-64) = 5.4.16-46.el7            Available: php-common-7.1.26-1.el7.remi.x86_64 (remi-php71)                php-common(x86-64) = 7.1.26-1.el7.remi            Available: php-common-7.1.27-1.el7.remi.x86_64 (remi-php71)                php-common(x86-64) = 7.1.27-1.el7.remi  You could try using --skip-broken to work around the problem  You could try running: rpm -Va --nofiles --nodigest cause: you have the wrong version of PHP modules installed as the error message clearly states that requires php-common(x86-64) = 7.1.27-1.el7.remi installed: php-common-7.2.16-1.el7.remi.x86_64 (@remi-php72) either remove the package by using yum remo

Project directory /home/bum/public_html/project-community-edition/ is not empty.

Image
Error:  Project directory /home/bum/public_html/project-community-edition/ is not empty. Cause: Directory where you want to install Magento or any application needs to be empty ie. there should be no contents. To check use the command: ls -a and remove unnecessary files so here folder project-community-edition is extra and we need to remove it so use command: rm -rv pro* you too can use the same command just change pro to initials of your folder name if you have multiple folders remove all by same.

Your requirements could not be resolved to an installable set of packages.

Your requirements could not be resolved to an installable set of packages. Error:   Problem 1     - Installation request for magento/product-community-edition 2.2.3 -> satisfiable by magento/product-community-edition[2.2.3].     - magento/product-community-edition 2.2.3 requires php 7.0.2|7.0.4|~7.0.6|~7.1.0 -> your PHP version (5.4.16) does not satisfy that requirement.   Problem 2     - Installation request for squizlabs/php_codesniffer 3.2.2 -> satisfiable by squizlabs/php_codesniffer[3.2.2].     - squizlabs/php_codesniffer 3.2.2 requires ext-xmlwriter * -> the requested PHP extension xmlwriter is missing from your system.   Problem 3     - phpunit/phpunit 6.2.4 requires php ^7.0 -> your PHP version (5.4.16) does not satisfy that requirement.     - phpunit/phpunit 6.2.3 requires php ^7.0 -> your PHP version (5.4.16) does not satisfy that requirement.     - phpunit/phpunit 6.2.2 requires php ^7.0 -> your PHP version (5.4.16) does not satisfy that re

As there is no 'unzip' command installed zip files are being unpacked using the PHP zip extension.

As there is no 'unzip' command installed zip files are being unpacked using the PHP zip extension. This may cause invalid reports of corrupted archives. Besides, any UNIX permissions (e.g. executable) defined in the archives will be lost. Installing 'unzip' may remediate them. cause: no unzip software/Application is installed on the system. solution: Ubuntu: sudo apt-get install unzip                RPM based os(Cent OS): sudo yum install unzip

Invalid credentials for 'https://repo.magento.com/packages.json', aborting.

Image
Error Message:  Invalid credentials for 'https://repo.magento.com/packages.json', aborting. cause: wrong credentials The main problem is that people here try to use the username and password used for login in Magento website. 1. Go to  https://marketplace.magento.com/  sign in with your own credentials. 2. After that go to my profile from the top right corner. 3. Then click on access keys. 4. You might have keys already generated if not please click on the Create new access keys(make sure you are creating or using keys for right Magento version 1 or 2). and use public key as username and private key as a password.

Steps to install magento 2 using comopser

Steps to install Magento 2 using composer Step 1: Login to the server through SSH step 2: Download composer and install it from here https://getcomposer.org/download/ step 3: Use the Command for the Installation: php -d allow_url_fopen=1 composer.phar create-project --repository=https://repo.magento.com/ magento/project-community-edition=2.2.3 Keep in mind this is going to install community edition 2.2.3 for more details visit https://devdocs.magento.com/guides/v2.3/install-gde/composer.html In php.ini allow_url_fopen=1 should be enabled either through Cpanel or do it by SSH login to the server otherwise you will be getting an error After installation bin/magento setup:install \

ERROR: [pool www] unable to set listen address as it's already used in another pool

         ERROR: [pool www] unable to set listen address as it's already used in another pool Error on php-fpm command: systemctl restart php-fpm Error Info on: php-fpm -t  solution: Go to the folder cd  /etc/php-fpm.d you will get .conf files there just rename www.conf to www.conf.sample The issue is caused due to having multiple conf files for single host so if you have please change the name.

what is page load time and why it is so important for a website

Page load time is the time required to fully load a website in a web browser. this time is very crucial as a user who visits your website may lose interest to further interact with your website because it feels to slow for him/her. To check page load speed time you can always head to following websites. 1. Google web page speed  https://developers.google.com/speed/pagespeed/insights/ 2. Gt metrix  https://gtmetrix.com if fully load time is in between 1-3 good else you need to minify JS, CSS and enable CDN(content delivery network) and ya don't forget to check latency 

All about SSL certificates

Why SSL is so important for a website? 1. To secure your user's data from intruders Like if a user enters the password "Kailash" this will be encrypted in the form of ciphertext like "sdfbsdfasdgvew" 2. Authenticate a domain. when you try to grab an SSL certificate for your website you will have to authenticate that this domain is owned by you. 3. PCI compliance(set of rules to do online business) If you are doing online business then you need to make sure that your website is PCI compliance.