MO::export_to_file() WordPress Method

The MO::export_to_file() method is used to export a WordPress database to a file. This is useful for creating backups or for moving a WordPress site to a new server.

MO::export_to_file( string $filename ) #


Parameters

$filename

(string)(Required)


Top ↑

Return

(bool)


Top ↑

Source

File: wp-includes/pomo/mo.php

		public function export_to_file( $filename ) {
			$fh = fopen( $filename, 'wb' );
			if ( ! $fh ) {
				return false;
			}
			$res = $this->export_to_file_handle( $fh );
			fclose( $fh );
			return $res;
		}

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.