Tag Info

Hot answers tagged

7

if you check the Wordpress importer plugin it is easy to implement this feature. But if you want the direct answer , here it is First of all, we need to copy the Wordpress importer plugin files to our theme directory. like this 1. themes/bootstrapguru_theme/inc/wordpress-importer.php 2. themes/bootstrapguru_theme/inc/parser.php you can find ...


4

@import is a convenient CSS shortcut for loading a particular stylesheet (often parent themes or other dependencies), but part of the reason why it's generally discouraged is due to - as you had mentioned - a small performance hit (stylesheets loaded with @import are not loaded in parallel). Another reason is that by loading stylesheets with Wordpress' ...


3

You should probably not run preg_replace on the meta data for a _wp_attachment_metadata field as the data is serialized. I would recommend instead you write a small script to loop through the images, unserialize the data, update the value, serialize and store the modified array. Here's a sample function which does just that: function ...


2

Hook int force_filtered_html_on_import and return FALSE. See ticket #14818. add_filter( 'force_filtered_html_on_import' , '__return_false' ); By default this is set to TRUE in wp-includes/ms-default-filters.php.


2

Simplest method to put your website in Maintenance mode, is to create a .maintenance file in your WordPress root folder with following content. <?php $upgrading = time(); ?> Make sure you place this file in same folder as your wp-load.php file. I just said that because in case you have WordPress installed in a sub-folder. Whenever you are ready to ...


1

When you use the importer it should prompt whether to download any media/attachments it finds in the posts. If you don't say yes, they will not be added to your Media database. To my knowledge, even if you do say yes, Featured Images are not included. It's a very rare instance that I recommend using the built-in importer, and migration from one server to ...


1

This is the solution..... hope you will enjoy You can change that setting by making a simple text file and putting it into the wp-admin folder. So to make this file all you have to do is open a simple text program like textedit on Mac or notepad on Windows and type these two lines of code. upload_max_filesize = 64M; post_max_size = 32M; You can put in ...


1

Its not that $wpdb->query does not need $wpdb->prepare(), it's because of not using $wpdb->prepare() in a correct manner. In your case $wpdb->prepare() never received any values which it must. Please refer to the Codex for details about using $wpdb->prepare().


1

If you have already created the database that you wish to import into and you have selected that database in PHPMyAdmin, but the import file is trying to create a new database, then you will see this error message. All you need to do is open up the SQL file in a text editor and delete the line that begins with CREATE DATABASE (it will be very near the top ...


1

From what I can see, you are inserting data in table wp_commentmeta. However the column meta_id has a Primary Key restriction. You can see the table definition at http://codex.wordpress.org/Database_Description#Table:_wp_commentmeta As meta_id has a Primary Key restriction, this column may only hold unique values. The insert statements you have posted show ...


1

Sounds like a sound approach to me! Not enough rep to comment so I'm posting an answer... Only advice I'd have is to 1. Make sure character encodings are correct so you don't end up with a bunch of "æÃ" 's 2. Make database backups :-) As to ACF, I think it's pretty much the same as the "add_post_meta" function. Maybe it has a separate one in its API. But ...


1

In WordPress, user's Biography is saved in User Meta table with description key.


1

Nope, the WP is pretty flexible about this and will perfectly handling omitted fields. Including assigning IDs (which is actually best left to it, outside of edge cases when exact IDs must be imported). The only situation that natively won't let you create post is if neither of title/content/excerpt is provided and post type supports any of them. Even then ...


1

If you can guarantee the "uniqueness" of each page's title, I would first run the entire import, and then loop over the newly inserted pages & set their parents by cross referencing the CSV.


1

Worst case scenario, just make a new environment, with that theme (can even be on the live), then just re-upload the CSS and anything else you've edited (successfully that is).


1

Export the posts via the exporter at wp_admin->Tools->Export and bundle the resulting file. Provide the end user with instructions for importing them-- basically, install the WordPress importer and then visit wp_admin->Tools->Import. Please do not try to force installation of your posts automatically as it will insert data into the user's ...


1

It's not difficult. You need to transfer files to the new server. Create a blank database and keep it's name, user_name (this user must have all privileges of this newly created database) and password. Edit config.php file on new server with the these new details. Read: Wordpress Codex for transferring site


1

Admittedly, this is a guess. The exporter, in the versions I have used, does not save your files to a local disk. It creates an XML file with references to your images on a server somewhere. When the importer reads the XML file, it will download from that server and upload to your new installation. If your images are not available-- not accessible for ...


1

You can get all ids of featured images querying the "post_meta" table for "_thumbnail_id" (as Milo said) in the "meta_key" column and selecting the "meta_value" column. Then replace your values in the same "post_meta" table where "post_id" are the ones above and "meta_key" is "_wp_attached_file" and / or "_wp_attachment_metadata" Hope that makes sense



Only top voted, non community-wiki answers of a minimum length are eligible