Yes, the 404 is because the local and remote server URLs are different. As a solution:
- You should set the local domain to be the same as the remote server
- In wp-config.php connect to the remote DB
- When you will need to access the remote server you’ll need to update the file
hostsand comment out the line with your remote url- If your
hostsfile is updated on start/stop of your local server you can just stop the server and you’ll have acces to the remote
- If your
If your domain name is xdirtseries.co.za you should set in vhost the server name and alias to match the domain, so that when you local server is started you’ll see the local version, otherwise your online version.
ServerName xdirtseries.co.za
ServerAlias www.xdirtseries.co.za
And the hosts file:
127.0.0.1 xdirtseries.co.za www.xdirtseries.co.za
This should work 🙂
Related Posts:
- Delete all post meta except featured image
- Set Display Name to first and last name (phpmyadmin SQL Query)
- Emojis getting converted to “?”
- Delete all post meta except featured image Using SQL
- WordPress database import: Row size too large
- Changing root password in PHPMyAdmin for WordPress Database when going live
- Can’t update WordFence Options, clear data manually
- Installing local to live WP into subdirectory
- DB prefix not updating
- I wanted to Know that how can I give ingore to 0000-00-00 in my config file
- I imported an restore an database and It shows #1067 – Invalid default value for ‘user_registered’
- Missing latest posts and options after DB migration via phpMyAdmin
- Check if a database is well installed
- Deleting WordPress posts and media files based on author via MYSQL database
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- MySQL SELECT increment counter
- phpMyAdmin – Error > Incorrect format parameter?
- How to create a foreign key in phpmyadmin
- MySQL Database User: Which Privileges are needed?
- Why is my database import losing text widget data?
- Will it break my site if I delete all transient records in wp_options table?
- Please explain how WordPress works with MySQL character set and collation at a low level
- Reset Post IDs to less than 64bit integer
- Restoring WordPress posts from database only
- WordPress database scalability from the code perspective
- Does WordPress use the InnoDB engine for MySQL by default?
- Can I use MariaDB instead of MySQL in wordpress?
- What are conventions about the schema of the $table_prefix
- Split WP install between 2 databases?
- Inserting Post Meta From SQL
- Migrating non-WordPress CMS to WordPress, lots of data to move — possible solutions?
- Why does dbDelta() not catch MysqlErrors?
- Is deleting orphaned wp_options entries safe?
- Is altering a default WordPress database table update safe?
- How to solve slow WordPress site caused by attachment_metadata
- Custom DB_COLLATE (collation) value not working on fresh install?
- Export only pages and posts with mysql dump
- What causes the “max_user_connections” warning on WordPress frontend?
- what to do when your WordPress database is too large?
- Change all http to https in mysql databse?
- Large database causes slow load
- Delete duplicate rows from wordpress database where a column is duplicate in phpmyadmin
- Database slowdown after update to 3.4.1
- WordPress and automated MySQL backups to a different host
- How to insert data into MySQL database from the form created in WordPress site
- How Do I Merge Categories With phpMyAdmin
- Size article thumbnails and retrieve them directly from database
- WordPress site uses MyISAM, should I switch to InnoDB necessary?
- WordPress mysql table double prefixes
- Advanced SELECT query with condtional statements
- Why do mass updates to post_content shows in front end, but not in edit screen?
- Error establishing database connection – high traffic?
- Improve performance by removing unnecessary database queries
- Redirecting to old domain after migration website
- WordPress Database Huge wp_usermeta Table
- A MySQL DB within a MySQL DB
- Switching Databases in LocalHost
- Will changing the folder name two directories above a fresh wordpress installation break the site?
- Is there a way to recover the table wp_term_relationships?
- Unable to set a default serialized array using dbdelta()
- How to prevent/delay MySQL connections when an object cache is used?
- Migrating from PDO using SQLite to clean new install using MySQL
- Better ads plugin has 500.000 entries in wp_postmeta
- Duplicated site isn’t recognized as a site
- Error establishing a database connection,
- How to properly check if a table exists in WordPress Database using Show Tables Query
- Post Views / Hit Counter Problem?
- How and where is wordpress adding mySQL content to database?
- How to create more than one new wpdb object?
- SELECT SQL_CALC_FOUND_ROWS with wordpress search
- Remote database -> massive response time increase?
- wp_option table error while importing
- Getting “Error Establishing a Database Connection” on localhost in new Mac OSX Lion environment
- Cloning blog to localhost via WAMP
- Only allow user to access a link once a year, based on their joining date
- Delete user with only subscriber role
- Can’t log into wordpress site – I have made a new user and still cant access
- Counting post and changing roles in mysql database. Query not code
- MSQL database wp_postmeta has meta key tve_revision
- How to edit custom table data in frontend
- local wordpress broke after changing URL
- “BS_” rows in postmeta table
- Exporting Post ID, Post Title, Primary Category and Primary Category ID
- Duplicate database to roll back theme & content changes
- WP website showing blank page after moving from subdomain to main domain
- How to create index (sql) to a meta_key?
- WPCLI search and replace in a particlar site dir effect another site-dir
- mySQL database size large, but tables size less
- How To connect to the same WordPress database with different database user
- Hang Up Followed By Can’t select database
- WordPress character set issue
- Create a new table on the database and save parameters from a contact form
- Changed meta_key value in structures, now dashboard shows zero users
- Why is converting my database to UTF-8 truncating entries?
- Database question while Migrating from one domain to another on same WebHost [Bluehost]
- export individual posts to text files or a single csv file
- How to find fresh (last modified) and sql backup?
- SQL errors when querying for something with apostrophes
- Database table prefix different between wp-config.php and in database
- Naming conventions for database tables