php

Send emails from local WordPress setup using SMTP

While doing testing of WordPress in local system many times we need to do the email testing and we can't do it as we don't have SMTP server installed on local system. Without going to option of installing SMTP server on local it would be easier to use free SMTP server to send emails from local WordPress setup. I have already given instructions on how to send emails using SMTP server from localhost which uses phpMailer script. WordPress also uses phpMailer to send emails so we can do the changes in coding files to use SMTP and provide username and password. But that is not a recommended option. We can do it easily using WP Mail SMTP plugin.

PHP – Send mail from localhost using SMTP

When you setup apache in local system it won't by default setup SMTP server. Hence, if you want to send emails from local system, you will have to either set up SMTP server on your local or use external SMTP server. There are many service providers available who can give you SMTP, username and password to send email using their SMTP server. But it isn't very easy and straight forward to use SMTP in PHP. While searching I found PHPMailer script doing that very nicely and efficiently. You can download PHPMailer from their official site and read further to get more instructions on how to use gmail (or any other) SMTP.

Access mysql database hosted on remote server using phpMyAdmin

Last week, for one of my projects, I had to access a database which was hosted on remote server and there was no phpMyAdmin installed on that server. As I am an avid user of phpMyAdmin and quite familiar with it, I wanted to access the remote database server using phpMyAdmin only. I knew that phpMyAdmin does give a facility to access database on remote server and it was just a matter of configuration to make it work. When we access http://localhost/phpmyadmin it connects to the local mysql server by default.

To make it connect to other servers you can follow the following steps: