Strategery Migrations Plugin

özgür koca, ensei tankado, okocaözgür koca

Strategery Migration 1.0, WordPress plugin install migrate download Strategery Strategery migration, migration, multi-site

This plugin is designed to accelerate and manage the process of creating an ongoing migration scripts. Migration scripts used for editing content on a blog a blog basis, by manipulating the PHP files that your WordPress database. This may be theAdding or removing pages, or for specific blogs. Strategery Migratsiitakzhe provides an interface for management migration scenarios. You can specify a list of all files and migrate to the stamp of when the migration file was created to be seen. You can see some of the State Migration blogs, "so you can tell which files were executed or when certain blog has moved. You can view a list of all your blogs and see whattheir state of migration compared.

Download PluginStrategery migration


This plugin is designed to accelerate and manage the process of creating an ongoing migration …

This plugin wasmade for the implementation of WordPress, with a network with a multi-site directories.

Authors: GabrielSomosa (
Key Tags: ,


  1. show

  2. \him.

Installing Migration Strategery

  1. Download and copy the folder Strategery migration '/ wp-content/plugins / "directory
  2. Network,the plugin in "plugins" in the menu bar activate network administration


Why not migrate to report anything in there?

Open IE and Safari create a file in order to see the migration report. There should be a line after the migration, Wosien can open the file.

What kind of reaction WordPress is this plugin compatible?

To use this plugin canthey have installed the network многосайтовойиспользованием subdirectories. No sub-domains.

I have a new file migration using the form. Where is this file?

The migration files are in '/ wp-content/plugins/strategery-migrations/migrations /'.

I have a new migration file … And what now?

Open the resulting file and put any code in theBest method is required. Must Ortjeder code, terminate all processes is not lower in the method. (Down metodoptsionalno)

I try to run the migration script, and it says it is already up to date.

The plugin will only run the migration script with a time stamp later than the current time state migration blogs. If you are in a migration to the blog, and he has the label later than the other scenario that made before it,that before the script should not be executed. Only scripts from earliest to latest, if Siediese run separately. If you have run a few scenarios tatdolzhny, it is best to start them all at once, to avoid errors.



Original version

Additional Comments

Instructions for use

Scripting migration

  1. Click on the Add link in the migration of the tab, the administrator options
  2. Enter the name of the script file with underscores instead of spaces (file_name)
  3. NazhmiteSozdat file

You are then redirected to a list or migrate files.

At the moment the file was created and exists in '/ strategery-migrations/migrations / "folder in theDirectory of the "plugins".

The file is divided into two parts. The first part before the hyphen (-) is a label inYYYYMMDDHHMMSS. This number is used to compare the quiet of a blog as compared to when the file was created. When the migration started and finished, it budetobnovlenie blogs that ran the migration in order to reflect the new state. Sate for the blog as a label youngest migrations are performed the fact. Onlyperformed with the later migration than the state label tag of your blog. The second part of the file the correct name of the script file migration. Format used to read the underscore and space to create a plug-in class names in the file, with camel case.
Open the file you created and begin to program migratsiistsenary. You will notice that the file is a class that contains the basic class of extended migration. Each migrationScript defines a new class with two Methoden.Vor the method used to create pages or posts. This method of creation. Down method is used to cancel up method. It is a way to migrate back. This method is not mandatory.
Methods of work in a blog a blog and within each blog. UMID of the current blog, for instance, you can ispolzovatget_current_blog_id () function.


Abstract models that are required to query the database. Models are used to save or delete this type of model in the database. The model can post or page, etc. To make the models should you use the getModel function.

$ This-> getModel ($ type $ data);

$ Type – string, which selects the model of the weather page or message, etc.

$ Data – array of information dasenthält svyazannuyuk model type.


$ Data = array ('post_type' => 'page', 'post_name' => 'Add menu', 'POST_TITLE' => 'Add menu item');

$ = The disclosure of this-> getModel ('post', $ data);

Siekönnen the key combination getPost ($ data).

The commands above query the database for existing sites, the data given inthis blog post to fit and return the object. You can get access to information, dasspostaispolzovaniya object. For example, $ post-> id is the message ID.

To create the page, use the same function call and add -> Save () to the end.

$ = The disclosure of this-> getModel ('post', array ('post_type' => 'page', 'post_name' => "Menu" again,"POST_TITLE '=>' Add menu item ')) -> Save ();

The above command will query the database for existing positions corresponding to the data given in this blog. If there is no match in the database, this paper budetsozdat in the database and returns the data object it. Save () command does not create duplicates.

If you want to delete this post really just need to save () with delete () to replace.

Your database

Should use the database without the use of models AbfrageSie, this $ db-> (). There is a database of WordPress. Sleduyuschuyukod to use, for example, you should.


$ This-> db () -> insert ($ table, $ data);

If you insert a table every blog you need to set $ db table $ this-> () -> message

The team is likelook like

$ This-> db () -> insert ($ this-> db () -> message, $ data);

Special pages

This plugin comes with a migration utility class that lets you select a page from the menu navigatsii.Stranitsy that is not to delete appear in the navigation can be removed easily with a single line of code. These pages are still available and still exist, but they will not see another user with all of yourNavigation links.

This eliminates functionality requires another activated.

To use the additional functions needed to ischetedlya the path to the auxiliary-class pass, you.

$ This-> getHelper ($ path);

GetHelper function accepts a string containing the path to a particular class you are looking for an assistant.

$ This-> getHelper ($ path) -> method ($ args);

This is a complete call a helper method of the class, hatHilfsfunktion that the path to the class, you went. getHelper is an instance of this class and can be used to execute methods. All utility classes are in "/ Library / Assistants / plugins / 'directory. It contains. PHPDateien with names in camel case. A class that is defined in each file name as file name, except byan underscore separates each word. To exclude the class of navigation, it is included in ExcludeFromNav.php file, but the name of the class exclude_from_nav. This is the name that the screens must for an auxiliary function.

Below is an example of how to call from the navigation pomoschnikklassa excluded.


$ This-> getHelper ('plugins / exclude_from_nav') -> delete ($ post-> ID);

delete () takes the KennungDie pages are excluded as an argument.


Although the migration is run, it is in the migration report, which indicated the progress of the migration. It will let you know whether it was a mistake looking for a specific office or if the migration has already been done and don today.

You can add your own entries to the inside of your information up and downMigration methods for each scenario. This can be a simple message that you have done all that you are trying to do. This can be done werdenmit log () function. This is just an echo string is passed.

$ This-> log ($ message, $ n);

Above, as they say. This is not a format-string, line breaks and tabs should be added in the usual way. $ P is an optional parameter that is of type BOOLkotorayadetermines whether a new line at the end of the string add $ message.

From migration scenarios

There are several ways to perform the migration scenarios, depending on how you want to migrate solltengetan.

The options are:

  • Run single file migration of certain blog
  • Perform the migration of all files for blogs
  • Perform all the migration files for all blogs

Can start a migration file to a specific blogVy in this blog in the WordPress backend and click on the link in the migration of the migration management tab. If you are running the migration list is the key for each element of the list on the right side. By clicking on this button, the script for the current run blog.

To all the migration of files for a particular blog, you caneither press the start button all the buttons at the top of the list that the migration of the blog or click on migration, which is listed in the blog page. To get to this page könnensollten panels for network administration bytV and click on the link to the blog list

Migration from the Administration tab. There is a migration of buttons for each blog on the right side or table.

To all the migrationall blogs carry press SieVerschieben all buttons on the top of the list blog.

Tags: , , , , ,

Leave a comment