Tools for maintaining a site running on Php and MySql
Almost every person visiting habrahabr at least once installed a CMS or transferred an already installed system. In most cases, this is the work of transferring files, a database, as well as editing configuration files. The network has a huge number of hosting companies that provide services for hosting sites on their servers, but not all have the minimum set of tools that allow you to transfer or perform regular operations with the site with comfort and high speed, without unnecessary emotions. The article will discuss the following scripts and programs: PhpMyAdmin, Adminer, Joomla System Tool, e-texteditor, Total Commander, WinSCP, PuTTY, Sypex Dumper, PHP Unzipper.Let's imagine that you are faced with the task of moving or installing a CMS, or maybe just a large number of scripts. First of all, we need to get a zip archive of files (if the system was installed on another hosting), which we can upload to a new location. To do this, you can use one file php script, which is better known to jumlododers under the name jsys.php. In fact, this is the "Joomla System Tool" , written by one of the members of the Joomla community under the nickname "Dead Krolik", and acts as a file manager, with truncated functionality, which in turn is quite enough to transfer files.

What is most valuable to me in this script is of course the archiving function. When a file manager with such a function is not available on the hosting, you have to dodge. Just jsys.php will help us, highlighting all the files with one click, choosing a name and clicking “Archive to”, we will get for an archived copy of our site, which we needed to get. In addition to archiving, this script will help us: delete / rename / copy files, unzip, add to the archive, change the rights to files and folders, download the desired file, find out information about the server. In addition, if you have a Joomla website, you can change the password of any user.
Secondly, we need to upload the resulting file archive to a new server and unpack it, upload the archive - there are no questions, but there may be a problem with unzipping. jsys.php sometimes doesn’t work on some hosting services, so “PHP Unzipper” may come to the rescue .

Its only task is to let the webmaster view the contents of the archive and unzip the archive. The script consists of two files, instructions for use are in readme.txt.
As a result, we uploaded the system files to the hosting and unpacked, this did not take us much time, at least not commensurate with the slow copying of one file, given the specifics of the ftp protocol. Keep in mind when you copy a lot of files via ftp, there is a chance that the file will be copied with an error. If this happens, you will look for a long time what the mistake is.
The next step is to migrate the database. I think everyone is familiar with PhpMyAdmin. This script allows us to work with the database through a web interface, i.e. through the browser, avoiding the command line. Every self-respecting hoster has it. But, it is quite monstrous and redundant, i.e. for small operations on the database it is inconvenient to enter it. I searched for an alternative for a long time and found the Adminer script (Search on the official site adminer.org ). What is important - there are enough functions in it to practically eliminate PhpMyAdmin from use. In addition, Adminer consists of one php file!

The main data of the script:
- Connection to the database by login and password.
- Choosing a database or creating a new one
- List of fields, indexes, secondary keys and table triggers
- Editing a table
- Editing table fields
- Managing indexes, secondary keys, triggers, etc.
- Data search in tables with sorting and limits.
- Adding new data to tables, as well as editing them
- Support for all data types
- Ability to execute SQL commands
- Export / Import
- User management
- and many more nice little things =))
In addition to working directly with the database, there is another great tool specifically tailored for import / export. It is called Sypex Dumper. A key feature of Sypex Dumper is its problem-free operation with different encodings, the ability to work with large databases. You can read more on the developer's website http://sypex.net/en/products/dumper/features

Work with transfers has been completed, we have transferred the files, the database too. Now we need to work with the files on the hosting, something to fix somewhere, edit the configuration file, etc. For this, many use Total Commander or another similar ftp client. The file downloaded, edited, uploaded back. This is rather dreary and fraught with errors. I discovered for myself an e-texteditor text editor for a programmer who has a built-in ftp client. After connecting via ftp we get the tree of site files in the left window, and the selected file in the right window. At the same time, there is a highlight and all the delights of a full-fledged editor.

Do not forget that it is very dangerous to save data for entering Total Commander , viruses spy access, and spamming scripts are uploaded to the hosting. Therefore, instead of Total Commander I recommend using WinSCP , it can connect via FTP, SSH and SFTP. Just in case, it is also worth keeping the prepared PuTTY to connect via SSH.
