WordPress migration with full Plesk integration

Step by step instructions for moving a WordPress site between servers using ‘duplicator’ plugin.

Source server
1. Install duplicator
Login to WP admin area. Click Plugins. Search for ‘Duplicator’ plugin and install.
2. Activate the plugin through the ‘Plugins’ menu in WordPress
3. Click on the Duplicator link from the main menu
4. Create your first package.
You will go through a verification check of the setup. Fix any issues that duplicator finds.
5. FTP installer.php and packageName_archive.zip to destination server (download to PC, upload to new server).

Destination server
1. Move installer.php and package.zip file into document root directory.
2. Install WP through Plesk. This step is only necessary if you want Plesk to recognize the WP installation.
3. Look in the wp-config.php file and make a note of mysql db, user, password and then rename file to be wp-config.php.back.
4. Run the installer.php script. Adjust domain name and mysql settings.
5. Verify successful migration.
6. Remove migration files: installer.php, installer-data.sql, installer-log.txt, packageName_archive.zip, wp-config.php.back

change maximum email size in plesk

To change this do the following,
Login to Plesk
Under Server Management, Click “Tools & Settings”
Under Mail, Click “Mail Server Settings”
Change the “Maximum Message size” to however large you would like it to be. (for example: 25600 for 25MB limit or 30720 for 30MB limit)
Click “OK”

virtuozzo backup tips

http://kb.parallels.com/en/113790

Summary
Parallels server virtualization products use Parallels Virtual Automation (PVA) for standard backup and restore operations.
Parallels Virtual Automation Agent (PVA Agent) provides backup and restore tools and an API for the particular Hardware Node it is installed on.
Parallels Virtual Automation Management Node (PVA MN) provides a centralized backup and restore API for all nodes registered in the PVA group.
This article describes the backgrounds of the backup and restore processes, the server roles in the backup and restore processes, and common terms used in PVA.
Server roles
Generally, there are three roles in a backup or restore process:
Virtualization node – The Hardware Node with the virtual environments to be backed up. It must have Parallels Virtual Automation Agent installed.
Backup storage node – The Hardware Node used for storing backup data. It must have Parallels Virtual Automation Agent installed.
Control node – The server initiating the backup process. It must have either Parallels Virtual Automation Agent or Parallels Virtual Automation Management Node installed.

A single server can handle all three roles in the case of a local backup.
Backup scenarios
Scenario Roles Example
Local backup of mypvcserver
Virtualization node: mypvcserver

vzabackup -F mypvcserver -e CTID
Locally initiated backup to the remote storage
Virtualization node: myvpcserver
Backup storage node: remotestorage
Control node: myvpcserver
vzabackup –storage root@remotestorage localhost -e CTID
Backup initiated from the storage server
Virtualization node: myvpcserver
Backup storage node: remotestorage
Control node: myvpcserver
vzabackup -F mypvcserver
Backup of the server to remote storage initiated by the third server
Virtualization node: myvpcserver
Backup storage node: remotestorage
Control node: myvpcserver
vzabackup –storage root@remotestorage -F mypvcserver -e CTID
Backup tools and interfaces
Graphical
PVA Control Center – The web interface of PVA MN, allowing you to manage backups for all Hardware Nodes in the PVA group.
Power Panel – The web interface for managing a particular container. A backup initiated from the Power Panel is performed according to the local settings of the Hardware Node the container is hosted on.
Parallels Management Console (obsolete) – A graphical tool shipped with older versions of Parallels Virtuozzo Containers. This allows you to perform backup and restore operations across registered nodes.
Command-line
vzabackup\vzarestore – CLI interface to PVA Agent Backup API methods.
vzbackup\vzrestore (obsolete) – CLI interface to TAR-based backup. This does not require PVA Agent to be running.
NOTE: On Parallels Virtuozzo Containers for Windows, this is in the form of another wrapper on the vzabackup\vzarestore tool.
API
Backup interfaces of PVA Management Node XML API.
Backup interfaces of PVA Agent via SOAP and XML API.
Backup backend
Parallels provides two backends for backup files:
One that is compatible with Acronis Backup and Restore (default)
One that is compatible with TAR.
The backup engine backend can be switched in the PVA Agent configuration file:
Edit the PVA Agent configuration file:
/vz/pva/agent/etc/vzagent.conf
or
/var/opt/pva/agent/etc/vzagent.conf
Change the backend value to 0 for Acronis-compatible, or 1 for TAR-based:
vzlin_backup_serializer (for pre-PVA 4.6.4 nodes):


1
1

0
360000



vzlin_backup_serializer11 (for PVA 4.6.4 and later versions):
`

1
1
0 0
360000



Restart PVA Agent:
~# pvaagent restart
Additional information
How to increase PVA Agent timeouts for backup operations
Acronis Error: Module=0 Code=0, Tag=0 troubleshooting
Parallels Virtual Automation builds, releases, and supported virtualization products

delete email on plesk server

One of our customers had checked the “leave message on server” box, by accident in Outlook and over 8 months accumulated over 20,000 messages (mostly spam) on the server. The mailbox was close to 1.5GB in size.

Its a Qmail mail server.

First, find out exactly how many messages are in the box and sort by the largest message

ls -Slh | – less

The | less will allow you to go page by page. To exit type :q

He requested that we delete all the emails that were over 30 days old.

Then stop the server

/etc/init.d/qmail stop

Command to remove all the old messages:

find /var/qmail/mailnames///Maildir/curr -mtime +X -print | xargs rm

replace +X with the number of days (so in our case it was +30)

the Maildir/new folder contains messages in the queue.

Depending on how many messages are in the folder the above command can take a few minutes – do not cancel until you get back to the prompt $.

/etc/init.d/qmail start

search log files for most common hits

If you are having problems with possible attack on your server, check the log files for the most common hits. Many times you will find one page being accessed beyond what would be normal.

va1-fv00150# cat /usr/local/apache/logs/*/*access_log | awk ‘{print $7}’ | sort | uniq -c | sort -rn | head
35806 /administrator/index.php
89 /
37 /robots.txt
30 /favicon.ico
20 /administrator/index.php?option=com_login
16 /imgs/flash.swf
15 /imgs/home.html
14 /wp-login.php
14 /js/AC_RunActiveContent.js
14 /imgs/styles.css

Use this information to find what log file is getting the hits:

va1-fv00150# grep -R “/administrator/index.php” /usr/local/apache/logs/*/*access_log | cut -d: -f1 | sort | uniq -c | sort -rn | head
38313 /usr/local/apache/logs/ibreporttv/ibreporttv.com-access_log
5 /usr/local/apache/logs/goinsidebusiness/goinsidebusiness.com-access_log

Use mutt to bounce emails to a different account

Login to the server and (as root or the account owner) run ‘mutt -f /path/to/his/mailbox’. From there you can type a capital ‘T’ (for “Tag messages matching the pattern I’m about to enter”), you will then be prompted to enter a pattern to match. Type ‘.’ (to match all strings) and enter. All messages should have an asterisk (“”) next to them.

Now type a semicolon (“;”–the semicolon tells mutt that the action you’re about to take applies to all tagged messages) and a lowercase ‘b’ (for “bounce”. Together ‘;b’ means “bounce all these messages I’ve just tagged”).

You’ll be prompted for an address to bounce the messages to. Type it in and wait a little bit for all the messages to bounce (you may be prompted by mutt to confirm you want to bounce the messages). When mutt tells you that it’s done, you can type semicolon again and then a lowercase ‘d’ (for “delete”). Type a ‘q’ to quit mutt.

count pop3 logins

show users that are sending email:
mail /var/log# grep authid= /var/log/maillog | awk -F “]” ‘{print$3}’ | awk -F , ‘{print$2}’ | tr -d ” ” | sort | uniq -c | sort -rn

show what IP addresses are sending email:
mail /var/log# grep authid= /var/log/maillog | awk -F “]” ‘{print$2}’ | awk -F “[” ‘{print$2}’ | tr -d ” ” | sort | uniq -c | sort -rn