MO::import_from_file() WordPress Method

The MO::import_from_file() method allows you to import a WordPress database from a file. This is useful if you want to move your WordPress site to a new host or if you want to backup your WordPress database.

MO::import_from_file( string $filename ) #

Fills up with the entries from MO file $filename


Parameters

$filename

(string)(Required)MO file to load


Top ↑

Return

(bool) True if the import from file was successful, otherwise false.


Top ↑

Source

File: wp-includes/pomo/mo.php

		public function import_from_file( $filename ) {
			$reader = new POMO_FileReader( $filename );

			if ( ! $reader->is_resource() ) {
				return false;
			}

			$this->filename = (string) $filename;

			return $this->import_from_reader( $reader );
		}

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.