It should be done via terminal as below. In the terminal navigate to bin folder of MAMP using below command cd /Applications/MAMP/library/bin Use this command to export the file ./mysqldump -u [USERNAME] -p [DATA_BASENAME] > [PATH_TO_FILE]. EG would be ./mysqldump -u root -p my_database_name > /Applications/MAMP/htdocs/folder_name/exported_db.sql Line should appear saying Enter password:. Here enter the […]
Get date from mongoid using Php
function getDatefromMongoID($mongoId) { $timestamp = intval(substr($mongoId, 0, 8), 16); $datum = (new DateTime())->setTimestamp($timestamp); return $datum->format(‘d/m/Y’); }
Install mongodb in easyengine
step 1 : ee shell yatramantra.com “pecl install mongodb” –user=root step 2: edit /opt/easyengine/sites/example.com/config/php/php.ini step 3: add “extenion=mongodb.so”
Setup mongodb in 5 minutes mac
https://ashiknesin.com/blog/setup-mongodb-mamp-5-minutes/ list brew services brew services list stop server brew services stop mongodb-community;
Edit host file in mac
Step 1: Open terminal and type following command and press enter key. sudo nano /private/etc/hosts Step 2: edit file according to your requirement. make sure that after IP address gives a space. step 3: Press control + o press control + x then terminal will be exit. To update changes clear the cache by typing […]
Find exploit scripts in WordPress through terminal
While searching on internet i found a site which provides premium plugin and themes for free. Because of the excitement i just downloaded a woocommerce premium plugin and uploaded directly to our live server through Git. Unfortunately, its was a big mistake. That plugin contains some exploit script. Nature of the Exploit Script: I have […]
Could not find module “@angular-devkit/build-angular”
I have developed an app and pushed to bitbucket repository and pulled from another system. unfortunately while building the app its showing an error “Could not find module “@angular-devkit/build-angular”. This mainly because of ng-module folder is usually ignored while pushing to git. Hence we need to update this files locally. You can simpley update the […]
Export large database MAMP -Mac
Sometime we want to export large database files. Here is the best steps for creating database exportfile in MAMP. It should be done via terminal as below. In the terminal navigate to bin folder of MAMP using below command cd /Applications/MAMP/library/bin Use this command to export the file ./mysqldump -u [USERNAME] -p [DATA_BASENAME] > [PATH_TO_FILE]. EG would be ./mysqldump -u […]
Easiest way to add a free ssl to domain using cloudflare free ssl
Adding a website to cloudflare.com Step 1: Go to www.cloudflare.com and click the Sign up link at the top of the page. Step 2: Create a Cloudflare account by typing your email address and password. Click Create account now to proceed Step 3: Enter the domain for your website and then click Add Site. It’s not necessary to add “www” to the domain. For example, if your […]
WordPress asking for FTP credentials to install plugins
Step 1: Try to add the code in wp-config.php: define(‘FS_METHOD’, ‘direct’); Step 2: Change /var/www folder ownership to www-data sudo chown -R www-data:www-data /var/www/ If you dont know the root user then just create a php script and following line of code and visit the page. <!–?php echo (exec(“whoami”)); ?–>