How To Export Database Dump From Mysql?

You can take mysqldump DB backup from Mysql with just simple steps.

  • First You need to log in with your SSH server.
  • After Login, Just go to your server directory location where you want to keep DB backup and that path must be writable.
  • Run the given command to take DB Backup,

Continue reading “How To Export Database Dump From Mysql?”

How to rename file programmatically Magento 2?

You can rename the file names in Magento by providing the source path and destination path.

I have tested the given functionality to rename the file names under the pub directory. You can do it for outside pub directory but you need to change __construct() method $this->directory argument value.

$this->directory = $filesystem->getDirectoryWrite(DirectoryList::PUB); Continue reading “How to rename file programmatically Magento 2?”

How to get current date time programmatically in Magento 2?

Magento 2 Fetch Current Date Time programmatically by use of the DateTime() method.

If you want to fetch the GMT Date time Check the link, Magento 2 GMT date time Format.

Just use the given code to display the current date and time from the system. Continue reading “How to get current date time programmatically in Magento 2?”