📜 ⬆️ ⬇️

Tools for servicing the site working 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 job of transferring files, databases, 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 face 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 php file script, which is better known to jumlavods 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 serves as a file manager, with reduced functionality, which in turn is 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. It will help us to just jsys.php, selecting all the files with one click, choosing the name and clicking “Archive to”, we will receive for an archived copy of our site, what we needed to get. In addition to archiving, this script will help us: delete / rename / copy files, unzip, add to archive, change permissions on files and folders, download the necessary 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 archive of files to a new server and unpack it, upload the archive - there are no questions, but there may be a problem with unzipping. jsys.php happens, does not work on some hosting, so "PHP Unzipper" can come to the rescue .
')


His only task is to let the webmaster see the contents of the archive and unzip the archive. The script consists of two files, instructions for use are in the readme.txt.
As a result, we uploaded the files of the system to the hosting and unpacked it, it took us not much time, at least not commensurate with the slow copying of one file, taking into account the specifics of the ftp protocol. Keep in mind that when you copy many files over ftp, there is a possibility that the file will be copied with an error. If this happens, you will search for a long time, what is the error.
The next step is to transfer 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. He has every self-respecting hoster. But, it is rather monstrate and redundant, i.e. for small operations on a database it is inconvenient to enter into it. I was looking for an alternative for a long time and found the Adminer script (Search at the adminer.org site). What is important - there are enough functions in it to practically eliminate PhpMyAdmin from everyday life. In addition, the Adminer consists of a single php file!



Basic script data:
- Connect to the database by login and password.
- Choosing a database or creating a new one
- List of fields, indices, secondary keys and table triggers
- Editing table
- Editing table fields
- Managing indexes, secondary keys, triggers, etc.
- Search data in tables with sorting and limits.
- Adding new data to the tables, as well as editing them
- Support all data types
- Ability to execute SQL commands
- Export Import
- User management
- and many more pleasant trifles =))

In addition to working directly with the database, there is another great tool, sharpened specifically for import / export. Called Sypex Dumper. A key feature of Sypex Dumper is its trouble-free when working with different encodings, the ability to work with volume databases. You can read more on the developer site http://sypex.net/ru/products/dumper/features



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



Do not forget that saving data to enter Total Commander is very dangerous, viruses try to access, and upload spamming scripts 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 cooked PuTTY for an SSH connection.

Source: https://habr.com/ru/post/78753/


All Articles