at path:ROOT / wp-admin / import.php
run:R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
17.74 KB
2026-03-11 16:18:51
R W Run
5.03 KB
2026-03-11 16:18:51
R W Run
2.77 KB
2026-03-11 16:18:51
R W Run
479 By
2026-03-11 16:18:51
R W Run
9.12 KB
2026-03-11 16:18:51
R W Run
1.97 KB
2026-03-11 16:18:51
R W Run
12.35 KB
2026-03-11 16:18:51
R W Run
5.47 KB
2026-03-11 16:18:51
R W Run
10.09 KB
2026-03-11 16:18:51
R W Run
11.35 KB
2026-03-11 16:18:51
R W Run
5.86 KB
2026-03-11 16:18:51
R W Run
4.38 KB
2026-03-11 16:18:51
R W Run
489 By
2026-03-11 16:18:51
R W Run
499 By
2026-03-11 16:18:51
R W Run
11.01 KB
2026-03-11 16:18:51
R W Run
14.38 KB
2026-03-11 16:18:51
R W Run
28.83 KB
2026-03-11 16:18:51
R W Run
14.6 KB
2026-03-11 16:18:51
R W Run
8.34 KB
2026-03-11 16:18:51
R W Run
6.21 KB
2026-03-11 16:18:51
R W Run
10.44 KB
2026-03-11 16:18:51
R W Run
22 KB
2026-03-11 16:18:51
R W Run
19.48 KB
2026-03-11 16:18:51
R W Run
7.33 KB
2026-03-11 16:18:51
R W Run
7.75 KB
2026-03-11 16:18:51
R W Run
11.02 KB
2026-03-11 16:18:51
R W Run
4.8 KB
2026-03-11 16:18:51
R W Run
7.58 KB
2026-03-11 16:18:51
R W Run
7.68 KB
2026-03-11 16:18:51
R W Run
6.8 KB
2026-03-11 16:18:51
R W Run
17.77 KB
2026-03-11 16:18:51
R W Run
934 By
2026-03-11 16:18:51
R W Run
4.26 KB
2026-03-11 16:18:51
R W Run
2.72 KB
2026-03-11 16:18:51
R W Run
2.89 KB
2026-03-11 16:18:51
R W Run
2.02 KB
2026-03-11 16:18:51
R W Run
2.92 KB
2026-03-11 16:18:51
R W Run
3.2 KB
2026-03-11 16:18:51
R W Run
3.58 KB
2026-03-11 16:18:51
R W Run
819 By
2026-03-11 16:18:51
R W Run
9.82 KB
2026-03-11 16:18:51
R W Run
17.46 KB
2026-03-11 16:18:51
R W Run
307 By
2026-03-11 16:18:51
R W Run
196 By
2026-03-11 16:18:51
R W Run
4.5 KB
2026-03-11 16:18:51
R W Run
216 By
2026-03-11 16:18:51
R W Run
229 By
2026-03-11 16:18:51
R W Run
215 By
2026-03-11 16:18:51
R W Run
217 By
2026-03-11 16:18:51
R W Run
219 By
2026-03-11 16:18:51
R W Run
215 By
2026-03-11 16:18:51
R W Run
4.74 KB
2026-03-11 16:18:51
R W Run
48.19 KB
2026-03-11 16:18:51
R W Run
5.39 KB
2026-03-11 16:18:51
R W Run
15.92 KB
2026-03-11 16:18:51
R W Run
21.65 KB
2026-03-11 16:18:51
R W Run
621 By
2026-03-11 16:18:51
R W Run
6.38 KB
2026-03-11 16:18:51
R W Run
21.22 KB
2026-03-11 16:18:51
R W Run
9.95 KB
2026-03-11 16:18:51
R W Run
9.94 KB
2026-03-11 16:18:51
R W Run
9.1 KB
2026-03-11 16:18:51
R W Run
13.6 KB
2026-03-11 16:18:51
R W Run
13.75 KB
2026-03-11 16:18:51
R W Run
6.96 KB
2026-03-11 16:18:51
R W Run
30 KB
2026-03-11 16:18:51
R W Run
2.7 KB
2026-03-11 16:18:51
R W Run
10.03 KB
2026-03-11 16:18:51
R W Run
2.34 KB
2026-03-11 16:18:51
R W Run
3.67 KB
2026-03-11 16:18:51
R W Run
2.79 KB
2026-03-11 16:18:51
R W Run
283 By
2026-03-11 16:18:51
R W Run
5.7 KB
2026-03-11 16:18:51
R W Run
17.48 KB
2026-03-11 16:18:51
R W Run
11.98 KB
2026-03-11 16:18:51
R W Run
3.99 KB
2026-03-11 16:18:51
R W Run
10.2 KB
2026-03-11 16:18:51
R W Run
2.2 KB
2026-03-11 16:18:51
R W Run
16.87 KB
2026-03-11 16:18:51
R W Run
23.38 KB
2026-03-11 16:18:51
R W Run
47.92 KB
2026-03-11 16:18:51
R W Run
3.43 KB
2026-03-11 16:18:51
R W Run
45.45 KB
2026-03-11 16:18:51
R W Run
12.79 KB
2026-03-11 16:18:51
R W Run
341 By
2026-03-11 16:18:51
R W Run
6.27 KB
2026-03-11 16:18:51
R W Run
14.9 KB
2026-03-11 16:18:51
R W Run
40.36 KB
2026-03-11 16:18:51
R W Run
24.05 KB
2026-03-11 16:18:51
R W Run
23.29 KB
2026-03-11 16:18:51
R W Run
5.12 KB
2026-03-11 16:18:51
R W Run
19.29 KB
2026-03-11 16:18:51
R W Run
1.09 KB
2026-03-11 16:18:51
R W Run
error_log
📄import.php
1<?php
2/**
3 * Import WordPress Administration Screen
4 *
5 * @package WordPress
6 * @subpackage Administration
7 */
8
9define( 'WP_LOAD_IMPORTERS', true );
10
11/** Load WordPress Bootstrap */
12require_once __DIR__ . '/admin.php';
13
14if ( ! current_user_can( 'import' ) ) {
15 wp_die( __( 'Sorry, you are not allowed to import content into this site.' ) );
16}
17
18// Used in the HTML title tag.
19$title = __( 'Import' );
20
21get_current_screen()->add_help_tab(
22 array(
23 'id' => 'overview',
24 'title' => __( 'Overview' ),
25 'content' => '<p>' . __( 'This screen lists links to plugins to import data from blogging/content management platforms. Choose the platform you want to import from, and click Install Now when you are prompted in the popup window. If your platform is not listed, click the link to search the plugin directory for other importer plugins to see if there is one for your platform.' ) . '</p>' .
26 '<p>' . __( 'In previous versions of WordPress, all importers were built-in. They have been turned into plugins since most people only use them once or infrequently.' ) . '</p>',
27 )
28);
29
30get_current_screen()->set_help_sidebar(
31 '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
32 '<p>' . __( '<a href="https://wordpress.org/documentation/article/tools-import-screen/">Documentation on Import</a>' ) . '</p>' .
33 '<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>'
34);
35
36if ( current_user_can( 'install_plugins' ) ) {
37 // List of popular importer plugins from the WordPress.org API.
38 $popular_importers = wp_get_popular_importers();
39} else {
40 $popular_importers = array();
41}
42
43// Detect and redirect invalid importers like 'movabletype', which is registered as 'mt'.
44if ( ! empty( $_GET['invalid'] ) && isset( $popular_importers[ $_GET['invalid'] ] ) ) {
45 $importer_id = $popular_importers[ $_GET['invalid'] ]['importer-id'];
46 if ( $importer_id !== $_GET['invalid'] ) { // Prevent redirect loops.
47 wp_redirect( admin_url( 'admin.php?import=' . $importer_id ) );
48 exit;
49 }
50 unset( $importer_id );
51}
52
53add_thickbox();
54wp_enqueue_script( 'plugin-install' );
55wp_enqueue_script( 'updates' );
56
57require_once ABSPATH . 'wp-admin/admin-header.php';
58$parent_file = 'tools.php';
59?>
60
61<div class="wrap">
62<h1><?php echo esc_html( $title ); ?></h1>
63<?php
64if ( ! empty( $_GET['invalid'] ) ) :
65 $importer_not_installed = '<strong>' . __( 'Error:' ) . '</strong> ' . sprintf(
66 /* translators: %s: Importer slug. */
67 __( 'The %s importer is invalid or is not installed.' ),
68 '<strong>' . esc_html( $_GET['invalid'] ) . '</strong>'
69 );
70 wp_admin_notice(
71 $importer_not_installed,
72 array(
73 'additional_classes' => array( 'error' ),
74 )
75 );
76endif;
77?>
78<p><?php _e( 'If you have posts or comments in another system, WordPress can import those into this site. To get started, choose a system to import from below:' ); ?></p>
79
80<?php
81// Registered (already installed) importers. They're stored in the global $wp_importers.
82$importers = get_importers();
83
84// If a popular importer is not registered, create a dummy registration that links to the plugin installer.
85foreach ( $popular_importers as $pop_importer => $pop_data ) {
86 if ( isset( $importers[ $pop_importer ] ) ) {
87 continue;
88 }
89 if ( isset( $importers[ $pop_data['importer-id'] ] ) ) {
90 continue;
91 }
92
93 // Fill the array of registered (already installed) importers with data of the popular importers from the WordPress.org API.
94 $importers[ $pop_data['importer-id'] ] = array(
95 $pop_data['name'],
96 $pop_data['description'],
97 'install' => $pop_data['plugin-slug'],
98 );
99}
100
101if ( empty( $importers ) ) {
102 echo '<p>' . __( 'No importers are available.' ) . '</p>'; // TODO: Make more helpful.
103} else {
104 uasort( $importers, '_usort_by_first_member' );
105 ?>
106<table class="widefat importers striped">
107
108 <?php
109 foreach ( $importers as $importer_id => $data ) {
110 $plugin_slug = '';
111 $action = '';
112 $is_plugin_installed = false;
113
114 if ( isset( $data['install'] ) ) {
115 $plugin_slug = $data['install'];
116
117 if ( file_exists( WP_PLUGIN_DIR . '/' . $plugin_slug ) ) {
118 // Looks like an importer is installed, but not active.
119 $plugins = get_plugins( '/' . $plugin_slug );
120 if ( ! empty( $plugins ) ) {
121 $keys = array_keys( $plugins );
122 $plugin_file = $plugin_slug . '/' . $keys[0];
123 $url = wp_nonce_url(
124 add_query_arg(
125 array(
126 'action' => 'activate',
127 'plugin' => $plugin_file,
128 'from' => 'import',
129 ),
130 admin_url( 'plugins.php' )
131 ),
132 'activate-plugin_' . $plugin_file
133 );
134 $action = sprintf(
135 '<a href="%s" aria-label="%s">%s</a>',
136 esc_url( $url ),
137 /* translators: %s: Importer name. */
138 esc_attr( sprintf( __( 'Run %s' ), $data[0] ) ),
139 __( 'Run Importer' )
140 );
141
142 $is_plugin_installed = true;
143 }
144 }
145
146 if ( empty( $action ) ) {
147 if ( is_main_site() ) {
148 $url = wp_nonce_url(
149 add_query_arg(
150 array(
151 'action' => 'install-plugin',
152 'plugin' => $plugin_slug,
153 'from' => 'import',
154 ),
155 self_admin_url( 'update.php' )
156 ),
157 'install-plugin_' . $plugin_slug
158 );
159 $action = sprintf(
160 '<a href="%1$s" class="install-now" data-slug="%2$s" data-name="%3$s" aria-label="%4$s">%5$s</a>',
161 esc_url( $url ),
162 esc_attr( $plugin_slug ),
163 esc_attr( $data[0] ),
164 /* translators: %s: Importer name. */
165 esc_attr( sprintf( _x( 'Install %s now', 'plugin' ), $data[0] ) ),
166 _x( 'Install Now', 'plugin' )
167 );
168 } else {
169 $action = sprintf(
170 /* translators: %s: URL to Import screen on the main site. */
171 __( 'This importer is not installed. Please install importers from <a href="%s">the main site</a>.' ),
172 get_admin_url( get_current_network_id(), 'import.php' )
173 );
174 }
175 }
176 } else {
177 $url = add_query_arg(
178 array(
179 'import' => $importer_id,
180 ),
181 self_admin_url( 'admin.php' )
182 );
183 $action = sprintf(
184 '<a href="%1$s" aria-label="%2$s">%3$s</a>',
185 esc_url( $url ),
186 /* translators: %s: Importer name. */
187 esc_attr( sprintf( __( 'Run %s' ), $data[0] ) ),
188 __( 'Run Importer' )
189 );
190
191 $is_plugin_installed = true;
192 }
193
194 if ( ! $is_plugin_installed && is_main_site() ) {
195 $url = add_query_arg(
196 array(
197 'tab' => 'plugin-information',
198 'plugin' => $plugin_slug,
199 'from' => 'import',
200 'TB_iframe' => 'true',
201 'width' => 600,
202 'height' => 550,
203 ),
204 network_admin_url( 'plugin-install.php' )
205 );
206 $action .= sprintf(
207 ' | <a href="%1$s" class="thickbox open-plugin-details-modal" aria-label="%2$s">%3$s</a>',
208 esc_url( $url ),
209 /* translators: %s: Importer name. */
210 esc_attr( sprintf( __( 'More information about %s' ), $data[0] ) ),
211 __( 'Details' )
212 );
213 }
214
215 echo "
216 <tr class='importer-item'>
217 <td class='import-system'>
218 <span class='importer-title'>{$data[0]}</span>
219 <span class='importer-action'>{$action}</span>
220 </td>
221 <td class='desc'>
222 <span class='importer-desc'>{$data[1]}</span>
223 </td>
224 </tr>";
225 }
226 ?>
227</table>
228 <?php
229}
230
231if ( current_user_can( 'install_plugins' ) ) {
232 echo '<p>' . sprintf(
233 /* translators: %s: URL to Add Plugins screen. */
234 __( 'If the importer you need is not listed, <a href="%s">search the plugin directory</a> to see if an importer is available.' ),
235 esc_url( network_admin_url( 'plugin-install.php?tab=search&type=tag&s=importer' ) )
236 ) . '</p>';
237}
238
239/**
240 * Fires at the end of the Import screen.
241 *
242 * @since 6.8.0
243 */
244do_action( 'import_filters' );
245?>
246
247</div>
248
249<?php
250wp_print_request_filesystem_credentials_modal();
251wp_print_admin_notice_templates();
252
253require_once ABSPATH . 'wp-admin/admin-footer.php';
254