30

Add below line to your wp-config.php before /* That's all, stop editing!...*/ define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST'] ); /* That's all, stop editing! Happy blogging. */


27

I had faced the same problem. I did the following to resolve it on an Ubuntu Server: In /etc/apache2/apache2.conf, edit AllowOverride None for /var/www/ to AllowOverride All Type in the following command to enable mod_rewrite for .htaccess sudo a2enmod rewrite Restart your apache server: sudo service apache2 restart The problem solved!!!


17

I asked this question over a year ago, and during that time we've added more people to our team and developed a much larger number of sites in WordPress. I wanted to walk through our process in case it might help anyone else. Everything in Git This was something I was doing even as I asked the question, but it's good to call this point out. Using Git has ...


14

For me it was changing old domain entries in database tables wp_blogs and wp_site to the new domain of the multisite's main domain. I haven't done this after the migration to a new domain.


12

I guess you haven't taken a look at the file that is served for downloading, if so you would have seen this: <?php /** * Front to the WordPress application. This file doesn't do anything, but loads * wp-blog-header.php which does and tells WordPress to load the theme. * * @package WordPress */ /** * Tells WordPress to load the WordPress theme and ...


9

serialize representation can be stored in text and reversed JSON representation can be stored in text but cannot always be precisely reversed Run this example: $query = new WP_Query(); var_dump( $query ); var_dump( unserialize( serialize( $query ) ) ); var_dump( json_decode( json_encode( $query ) ) ); After going through serialize accurate WP_Query object ...


9

You'll want to add these to your wp-config.php file: define( 'NOBLOGREDIRECT', '' ); define( 'WP_HOME', 'http://dev.domain.com' ); define( 'WP_SITEURL', 'http://dev.domain.com' ); So in its entirety, you'll have: $base = '/'; /** Multisite / Wordpress Network **/ define( 'WP_HOME', 'http://dev.domain.com' ); define( 'WP_SITEURL', 'http:...


8

It sounds like you need to change the URLs for the old images. The easiest & quickest way of doing that is to do a find and replace on the MySQL database. You can use PHPMyAdmin (usually provided by your web host) or other MySQL editing software such as Sequel Pro to make changes to your MySQL database without touching the WordPress admin area. This ...


8

Go to settings->permalinks and click on save button to rewrite flush. And then empty your browser cache. It'll work hopefully.


7

I found the solution here: https://www.digitalocean.com/community/questions/wordpress-permalinks-not-working-on-ubuntu-14-04 The thing is that we need to allow the override all option in httpd.conf (location: /etc/httpd/conf/httpd.conf) for your specific hosting directory.


6

Note: The following is largely untested (It worked after testing on one post). As you've pointed out when you edit a post, the plug-in takes the content in the database (HTML) and converts that to MarkDown for editing. Since in your case the content is actually not in HTML, but already in MarkDown, we want to stop this happening. Then by updating the post, ...


6

If your data is inside database as I understand, it is possible to export your database to CSV file and import this to Wordpress. CSV file is basically a comma separated list of data from your database that makes it possible to transfer data from different database structure to another. It does indeed take some effort to configure your export/import so that ...


6

Since WP-CLI 0.24.0 you can now use aliases which enable you to import a remote database quite easily. By using aliases, you can run WP-CLI commands against another WP-CLI install. That install could be a remote machine. With this in mind I've hacked together a bash alias that chains together several WP-CLI commands to pull a remote WP database into a ...


5

This can be somewhat tedious, but hopefully this helps. The less that changes from one environment to the next, the less painful this process will be. Particularly, if the domain, site id, file paths remain the same, the less painful this process will be. This post assumes some knowledge of database management. It is not a complete step by step because you ...


5

If you have access to your mysql you can update the wp-options table. Before modification... $ mysql -u <db_user> --password=<db_pwd> -D <db_name> <<<"select * from wp_options where option_name in ('siteurl', 'home');" +-----------+-----------------+---------------------------------------------------------------------------------...


5

As mentioned in the comments under your question, some data in the WordPress database is serialized and therefore not possible to change with a simple find and replace. You should read through the Moving WordPress section of the codex. Specifically the Changing Your Domain Name and URLs portion. I usually use a plugin or a command line tool depending on what'...


4

Unless there is a core Wordpress import filter available for your CMS ( see http://codex.wordpress.org/Importing_Content ) or a plugin for a CMS not covered by core WP ( see http://wordpress.org/extend/plugins/search.php?q=import ), or a Google search for your database schema doesn't reveal anything, you need to roll your own importer. The best way is to ...


4

Here are two possible solutions, both of these are actually generic MySQL version control tools but can be adapted to your workflow: dbv.php This tool creates "migrations", which are basically SQL scripts, from the changes detected on the database. These scripts are stored in a local directory and thus can be commited to your current VCS (git, for example)....


4

Simple steps 1 - Go to filemanager through cpanel or FTP 2 - Delete the .htaccess (make sure you have created a backup) 3 - Open your website and set the permalinks it will create a new .htaccess file . 4 - Enjoy! I just deleted .htaccess file and it is working perfectly now :)


4

It was Varnish. Our web host had Varnish set up in a Drupal-specific manner, and it was filtering out the cookies that WordPress uses to handle logins.


4

Wrangled up some things to check: @otto via comment on this post Look at the login page's HTML source. Is there anything at all before the initial DOCTYPE line? Even a blank line? If so, then you have some piece of code creating output before the headers are made, in which case this prevents it from setting cookies. Some suggestions from a highly ...


4

Sometimes on a new server it's just the rewrite module missing from Apache config. sudo a2enmod rewrite sudo service apache2 restart


4

This is because the site_url and homeurl of your original installation are set to HTTPS in the database, so you can't access your website on localhost unless you: Change these values to non-ssl Install a SSL certificate on localhost I will only explain the first case since installing a certificate is out of this community's scope. To do this, you have 2 ...


4

Since it is a custom site and database structure, there is no easy way to import your data into WordPress. I would suggest you instead focus on how you would accomplish the same thing within WordPress. In other words, start by pretending you don't have those 1,000's of ads, and build out your way of tracking ads in WordPress. Then, when that works, you can ...


3

My experience with blank home page. Sometimes when you are migrating your page you can get blank home page. I found the problem with the home page not displaying from the base URL. it was because there was a default.html file in the root directory. The old hosting server must had set the order to look for start files to PHP extension as the first default ...


3

Sounds like you know what you are doing that's a good start at a migration checklist :) FWIT ... Search and Replace is a very good plugin make sure you have a backup (my plugin DBC Backup 2 can help there) of your SQL database before you run it (just in case) Try to always set you're image and other URLs as relative (then you won't have to change ...


3

Notices won't trigger a server 500 error. However, "fatal errors" will. From your logs above: Fatal error: Class 'Memcache' not found in /var/www/wordpress/wp-content/plugins/flexicache/FlexiCache/Store/Memcache.php on line 63 This means you're running a plugin that depends on Memcache and your local system doesn't have Memcache support. Disable or ...


3

John's answer is correct re: using media_sideload_image, just note that you may need to require these scripts before if you aren't doing this within the context of WP Admin: require_once(ABSPATH . 'wp-admin/includes/media.php'); require_once(ABSPATH . 'wp-admin/includes/file.php'); require_once(ABSPATH . 'wp-admin/includes/image.php'); See https://codex....


3

Since WooCommerce orders and products are actually custom post types, using that importing tool will only transfer limited amount of data. To transfer the order details as well, you need to use phpMyAdmin to import the following two tables to your new site's database wp_woocommerce_order_itemmeta wp_woocommerce_order_items


3

I'm doing this on MYSQL. It puts all the tables schema and data into their own file so I can easily see what has changed. Unlike most of the other solutions in this thread this solution gets the data, which is important for a CMS. This solution doesn't use any tools, just a command line script. edit: I found my older code had a bug where import order was ...


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