2

I cloned a wordpress site to my local machine. Then I ran PHP's built in web server in the root of the WordPress site, via 'php -S localhost:3000'. I added my db credentials in wp-config.php. Then I added the following to the top of my wp-config.php file:

define('WP_HOME','http://localhost:3000');
define('WP_SITEURL','http://localhost:3000');

I restarted the php server. I can run the basic navigation pages. However, when I to go localhost:3000/wp-admin and log in, my admin links are broken when I click them from the sidebar. The string 'admin' is missing from the urls. If I manually type the url into the browser I can access these resources.

How can I fix this? Does anyone know what I did wrong in setting up my local dev environment?

I am on Ubuntu 14.04 LTS

  • Can you add your errors msg here with it? – Kvvaradha Feb 23 '16 at 1:51
0

Update: everything works fine if i log in via localhost:3000 > login page > login > click header dropdown.

However, I still have no idea why taking the route of localhost:3000/wp-admin breaks the links.

  • 1
    For those who bump across this post, "localhost:3000/wp-admin/index.php" should do the trick. For some reason, the PHP's built-in web server doesn't respect the url rewrite rules properly. – Prahlad Yeri Jun 11 '18 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.