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!!!
I guess you haven't taken a look at the file that is served for downloading, if so you would have seen this:
* 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 ...
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 ...
I found the solution here:
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.
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 ...
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 ...
If you have access to your mysql you can update the wp-options table.
$ mysql -u <db_user> --password=<db_pwd> -D <db_name> <<<"select * from wp_options where option_name in ('siteurl', 'home');"
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 ...
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 :)
Your issue likely lies somewhere within wp-config.php. You should not need to run any install if your tables already exist, the wp-admin/install.php is only used when no tables are detected with the settings in wp-config.php.
Going through parameter by parameter, I'll give you some idea of what everything is.
DB_NAME is the name of the database that ...
Solved this problem on Linux Mint 19 / PHP Version 7.2.19-0ubuntu0.18.04.1 by changing:
Options Indexes FollowSymLinks
Require all granted
Options Indexes FollowSymLinks
Require all granted
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'...
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 ...
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');
Here are two possible solutions, both of these are actually generic MySQL version control tools but can be adapted to your workflow:
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)....
You should not use this technique to change the URL of your site : WordPress sometimes stores URLs in serialized strings. You find/replace will corrupt the serialized data and discard the whole content.
You can use interconnect/it search and replace tool to change the domain without any risk. This tool even allow you to run a dry test to check what will be ...
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 ...
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 ...
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
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 ...
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 ...
Absolute or relative URLs are one of those eternal debates, but what you have to know in WordPress context is that it has strong affinity for absolute links. The logic is that changing absolute links in general is easier than changing level of relative links when necessary.
The second point you need to know is that WordPress stores a lot of stuff in ...
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 ...
Is is practical? Sure, if you like to learn new frameworks. Just spin up a Cloud9 or Pantheon account to test it out. It's PHP so just find a place where you're code fits in.
You'll just have to get used to the way WordPress's Template Hierarchy works and how it queries posts.
WordPress 4.4 drops tomorrow with some pretty interesting features out of the ...