Importing preview dummy data

Posted in: Newspaper
Post count: 7

Hi there,

I think I read there was a small version to import directly from the theme, but it was also possible to get a more complete version that closer resembles the one that shows under preview on themeforest. I am not sure I am asking in the right place, but I would really love to get the larger import file e-mailed to me, if that would be possible?

Thanks in advance.

Also…And I’m glad to have bought the newspaper theme. It is really easy to work with so far and with such an active community I’m sure I bought the right theme.

Best regards

Peter

Post count: 7

I meant I’m not sure if I’m asking in the right place, not wrong place…and there is an edit button, so please disregard this post. 🙂

Post count: 6600

Hi,

You can send an e-mail at contact@tagdiv.com and make a request for the xml file and we will send it to you.

Thanks

Post count: 7

So, I received your file, but haven’t been able to import it. I keep receiving the following error:

“File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.”

Now this seems to be an issue that indicates the PHP setup is inadequate for what I’m trying to do. This is how PHP is setup on 1&1 wordpress accounts:

PHP 5.4
allow_call_time_pass_reference – not supported
allow_url_fopen – active
display_errors – active
error_reporting – 22517
html_errors – active
include_path – .:/usr/lib/php5.4
log_errors – deactivated
magic_quotes_runtime – not supported
magic_quotes_sybase – not supported
max_execution_time – 20
memory_limit – 30M
post_max-size – 8M
prescision – 14
safe_mode – deactivated
short_open_tag – active
upload_max_filesize – 40M
zend framework – v2.4.0

I think the problem is with those settings.

I’m on a shared 1&1 account, but I have manually installed the normal wordpress (not using the 1 click installer). I can upload a php.ini. However I am not allowed to use SSH in order to make an uploaded php.ini recursive, which means that I have to manually upload a php.ini to wherever the importer does something. Since I do not know where that may be, I have gone ahead and copied a php.ini to any place that has .php files and even some additional ones (like upload folder).

This is how my php.ini looks:


<?php
/**
 * Custom WordPress configurations on "wp-config.php" file.
 *
 * This file has the following configurations: MySQL settings, Table Prefix, Secret Keys, WordPress Language, ABSPATH and more.
 * For more information visit {@link http://codex.wordpress.org/Editing_wp-config.php Editing wp-config.php} Codex page.
 * Created using {@link http://generatewp.com/wp-config/ wp-config.php File Generator} on GenerateWP.com.
 *
 * @package WordPress
 * @generator GenerateWP.com
 */

/* MySQL settings */
/* define( 'DB_NAME',     'database_name_here' );
/* define( 'DB_USER',     'username_here' );
/* define( 'DB_PASSWORD', 'password_here' );
/* define( 'DB_HOST',     'localhost' );
/* define( 'DB_CHARSET',  'utf8' );

/* MySQL database table prefix. */
/* $table_prefix = 'wp_';

/* Authentication Unique Keys and Salts. */
/* https://api.wordpress.org/secret-key/1.1/salt/ */
/* define( 'AUTH_KEY',         'put your unique phrase here' );
/* define( 'SECURE_AUTH_KEY',  'put your unique phrase here' );
/* define( 'LOGGED_IN_KEY',    'put your unique phrase here' );
/* define( 'NONCE_KEY',        'put your unique phrase here' );
/* define( 'AUTH_SALT',        'put your unique phrase here' );
/* define( 'SECURE_AUTH_SALT', 'put your unique phrase here' );
/* define( 'LOGGED_IN_SALT',   'put your unique phrase here' );
/* define( 'NONCE_SALT',       'put your unique phrase here' );

/* WordPress Localized Language. */
/* define( 'WPLANG', '' );

/* PHP Memory */
define( 'WP_MEMORY_LIMIT', '64' );
define( 'WP_MAX_MEMORY_LIMIT', '40' );
php_value upload_max_filesize 32M
php_value post_max_size 40M
ini_set('max_execution_time', 300); //300 seconds = 5 minutes

/* Zip Compression Activation

zlib.output_compression = On

/* Absolute path to the WordPress directory. */
/* if ( !defined('ABSPATH') )
/* 	define('ABSPATH', dirname(__FILE__) . '/');

/* Sets up WordPress vars and included files. */
/* require_once(ABSPATH . 'wp-settings.php');

I still get the same error though, so I have tried a few other things:

1. Changing the .htaccess file to include the change to php limits -> leads to the site being offline, giving me an error 500 page.

2. Using various other php.ini files with different code snippets from various sites and wordpress threads -> Same error, still no cigar.

3. Uploading a gzip file -> I receive a no WXR XML data error message.

4. Allowing czip compression in php.ini and uploading the zip -> Memory exceeded = Memory error on line 460 in some .php file leading me to believe that this isn’t gonna work out either.

Now 1&1 suggests for me to get Cygwin and mirror my folder setup and then just tinkering around more with my php.ini, so that I at least do not have to find every single php.ini and manually change it to a newer version. They were of the opinion that my php.ini looks fine and it should work. They also swear to me, that I have the rights needed for adding the php.ini (meaning it should be effective).

I am running out of patience here and still haven’t come one bit closer to being able to actually import the .xml I received.

Does anybody have any idea as to what I am doing wrong here or what else I could try in order to finally get a successful import of the full demo content?

Regards

Peter

Post count: 3343

Hi,

I found that is possible somehow to configure those settings directly from wp-config file from wordpress and leave the php.ini

Add this in your wp-config.php file and see if work.

ini_set('max_execution_time', 600); //600 seconds = 10 minutes
define( 'WP_MEMORY_LIMIT', '96M' );

or

https://wordpress.org/plugins/increase-upload-max-filesize/

or

Make a blank text file. Save As php.ini Inside the text file copy-paste the following:

upload_max_filesize = 32M
post_max_size = 32M

Load the php.ini file into the folder you’ve set up your website.

Thanks and hope will help!

Post count: 3343
Post count: 7

So I haven’t reported back, because I sort of gave up for a while. I’m back at it now though. So I called 1&1 about 6 different times, but mostly they couldn’t or didn’t want to help. Finally one of them told me that it would not be possible for me to make the changes, because I had installed wordpress in the root folder. He suggested for me to move my installation to a subfolder. When I did that my php.ini was being read, but still no luck in changing the upload max. through the php.ini.

Then I came back here and found Marius’ suggestions.

When I made the change in wp-config it changed to 8MB. Then I tried the other suggestion of just putting the 2-3 lines I really really needed in my php.ini and FINALLY THINGS WORK.

Big thanks to you.

And if anybody is having trouble with php settings on 1&1, move your installation to a subfolder (better yet reinstall) and search on wordpress codex for the steps to make it work as if it was installed in the root.

Many thanks again Marius.

Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic.